CrimsonLogic interview question

Related to basics of java