Set is a collection without duplicates. HashSet is fast but has no guaranteed order and relies on equals and hashCode; LinkedHashSet keeps insertion order; TreeSet keeps elements sorted (via Comparable or Comparator) with slower operations.
Example
Set<String> s = new HashSet<>();
s.add("a");
s.add("a"); // ignored