Ericsson interview question

Java concepts