Apolis interview question

2 easy logic questions and basic java knowledge.