AAVAS Financiers interview question

Basic java and OOP questions.