How can I iterate over a Set
/HashSet
without the following?
Iterator iter = set.iterator();
while (iter.hasNext()) {
System.out.println(iter.next());
}
How can I iterate over a Set
/HashSet
without the following?
Iterator iter = set.iterator();
while (iter.hasNext()) {
System.out.println(iter.next());
}