Collections in Java Part II : Sets

Hello Friends,

This is part II for the collections tutorial, earlier we discussed the basics of collection framework. In this part,we will look at the one of the child interface, the SET interface.

A Set is the collection that contains no duplicate elements. Any class implementing the Set interface is not permitted to have duplicate entries, to be more precised, no two elements in the Set s1 ans s2 are such that s1.equals(s2). The Set interface extends the super interface – Collection interface, however there is one subInterface of Set called as SortedSet. Continue reading “Collections in Java Part II : Sets”