Set Concept Simplified In Java

July 17, 2013

Set: Set is again a child interface of collection got introduced in Java-1.2V.

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...
  • HashSet(C-1.2V)
  • LinkedHashSet(C-1.4V)
The Interfaces extends sets are...
  • SortedSet(I-1.2V)
  • NavigableSet(I-1.6V)
  • TreeSet(C-1.2V)
Set interface doesn't contain any new methods and hence we have to use only collection interface methods.

You Might Also Like