// E N U M E R A T I O N, with generics
// (nothing to do with enum)
// (largely replaced by Iterator)

import java.util.Enumeration;
import java.util.Vector;

//...

Vector<String> v = new Vector<String>( 100 );
v.add( "broccoli" );
v.add( "cauliflower" );
v.add( "carrots" );
v.add( "peas" );

// Note the semicolon after hasMoreElements().
for ( Enumeration<String> e = v.elements(); e.hasMoreElements(); )
   {
   String value = e.nextElement();
   // display each vegetable
   out.println( value );
   }