for(Object o : iterator)

May 12th, 2003 by Hen

Does anyone know if this will work in JDK 1.5?

for(Object o : iterator)

or is it only for Collections?

One Response to “for(Object o : iterator)”

  1. Mats Henricson Says:

    It will work for any “Collection” object that has an iterator() function, PLUS all arrays, i.e. not Array objects, but [] objects.