Ericsson interview question

Java thread