Loop through the items of an HashSet
with a for-each loop:
Example
for (String i : cars) {
System.out.println(i);
}
Practice Excercise Practice now
Loop through the items of an HashSet
with a for-each loop:
for (String i : cars) {
System.out.println(i);
}
Practice Excercise Practice now