Programming Languages Java Mcq
Sep 24, 2025

Which collection class allows duplicate elements and maintains insertion order?

Choose the correct answer:
A) HashSet
B) TreeSet
C) ArrayList
D) HashMap
Detailed Explanation
ArrayList allows duplicate elements and maintains insertion order. HashSet and TreeSet do not allow duplicates, HashMap is not a collection of single elements.
Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback