Infosys interview question

Mostly about core java