Collection Framework - Set Interface and its implementations

Set interface extends the Collection Interface. So it has all the methods of the collection interface.

The set is primarily based on the rule that no duplicates are allowed and we do not care about the insertion order.

The set interface does not come with new methods.

Although its implementation classes have their own implementations and methods.

The implementation classes of the Set interface are as follows :

Image result for set interface

1. HashSet
2. LinkedHashSet
3. TreeSet (SortedSet and NavigableSet are interfaces)

Comments

Popular posts from this blog

Collection Framework - HashSet And LinkedHashSet class

Collection Framework - Cursors in Java

Hashed data structures