Set: Set is again a child interface of collection got introduced in Java-1.2V.
The Set interface extends to the Collection interface and it contains the methods that are inherited from Collection interface. The Set interface does not allow the use of duplicate elements in a collection.Hence the add() method returns false if we add the duplicate element to the collection.
If we want to represent a group of objects as a single entity where duplicates are not allowed and insertion order is not preserved, In such case we must implement Set .
The classes extending Sets are…
The Interfaces extends sets are…
Set interface doesn’t contain any new methods and hence we have to use only collection interface methods.