Ericsson Interview Question

basic java question mixed in with design patterns