Anonymous interview question

Mostly asked on Advanced Java.