I very much like the for-each-loop construction (for(T e : iterable)
) in Java which works on any Iterable<T>
because it makes in many cases very easy to read and to write code.
I wonder though if there is any way that I can access the underlying iterator from such a loop. This can be mandatory if I want to use the remove()
from the iterator.