Nokia interview question

Java