Difficulty: Easy
Correct Answer: java.util.Set
Explanation:
Introduction / Context:
Different collection interfaces in Java define different rules for storage: duplicates, ordering, and key-value mappings.
Given Data / Assumptions:
Concept / Approach:
Set interface represents collections with no duplicate elements. SortedSet (e.g., TreeSet) provides natural ordering.
Step-by-Step Reasoning:
Why Other Options Are Wrong:
Only Set ensures uniqueness; TreeSet (implementation) also provides natural order.
Final Answer:
java.util.Set
Discussion & Comments