Java HashSet.iterator()

Java HashSet.iterator() is a method in the Java HashSet class that returns an iterator over the elements in the set. It provides a way to iterate through the elements without modifying the set. Introduced in Java 1995 with Java 1.2, iterator() is often used in Java applications to traverse sets efficiently, especially when uniqueness and non-ordering of elements are desired.

https://docs.oracle.com/javase/8/docs/api/java/util/HashSet.html