Kizspy | Question: 43
(Choose 1 answer)
What is the main difference between HashSet and TreeSet?
A. HashSet uses a hash table; TreeSet uses a balanced tree.
B. HashSet allows duplicate elements; TreeSet does not.
C. HashSet sorts elements based on natural ordering; TreeSet does not.
D. HashSet allows null elements; TreeSet does not.