The Enumeration Interface
for (Enumeration primeEnum = primes.elements();
primeEnum.hasMoreElements(); )
System.out.println(“The next prime is “ +
((Integer)primeEnum.nextElement()).intValue();
Works with Vector, Hashtable, StringTokenizer, etc.
Gives a uniform means to access all the elements of some data structure one at a time.