Set Example in Java | Team MAST

preview_player
Показать описание
The Set interface implements the Collection interface.

You will learn Following about HashSet:
1. It uses hashtable to store the elements.
2. It implements Set interface.
3. It contains unique elements only.

LinkedHashSet:
1. It implements Set interface.
2. It contains unique elements only like HashSet.
3. It maintains insertion order. [Difference between LinkedHashSet and HashSet]

TreeSet:
1. It contains unique elements only like HashSet.
2. The TreeSet class implements NavigableSet interface that extends the SortedSet interface.
3. It maintains ascending order while storing elements.
Рекомендации по теме
visit shbcf.ru