A Set is a Collection that cannot contain duplicate elements. It models the mathematical set abstraction.
Set have its implementation in various classes like HashSet, TreeSet, LinkedHashSet.
For example:
HashSet:
Set<T> set = new HashSet<T>();
Here T can be String, Integer or any ...