A Set is a generic set of values with no duplicate elements. A TreeSet is a set where the elements are sorted.
A HashSet is a set where the elements are not sorted or ordered. It is faster than a TreeSet. The HashSet is an implementation of a Set.
Set is a parent interface of all set classes like TreeSet, HashSet, etc.
Comments
Post a Comment
Students you can ask your doubts in comment section