posted 19 years ago
The J5 for-each takes an iterable, and collections have been retrofitted to be iterable, thus avoiding the programmer having to extract an iterator.
Now, what if some API gives me only an iterator, is there a way someone can use the for-each loop for its brevity over such an iterator. Any workarounds?
ASCII silly question, Get a silly ANSI.