Corvil interview question

java classic question