Infosys interview question

Mostly focused on core Java and collections