You still need to write something like
Iterator itr = col.iterator;
while(itr.hasNext()) {
...do something
}
Lately I have seen a lot of the following where a for loop is used to iterate over a Collection, in fact, this is the code that Intellij generates to do that. I personally much prefer the while loop.
for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
Object o = (Object) iterator.next();
\t\t\t
\t\t}
besides in a good IDE like Intellij it writes the for loop for you