KPIT Technologies interview question

Java collection s