Yahoo interview question

Puzzles, java question