dcsimg

How do I use Enumeration to iterate through a collection?

John Zukowski

Enumeration enum = ...;
while (enum.hasMoreElements()) {
  Object element = iterator.nextElement();
  // process element
}