Antra interview question

Java core question