Endava interview question

OOP principles, Collections in Java