// E N U M E R A T I O N, without generics // (nothing to do with enum) // (largely replaced by Iterator) import java.util.Enumeration; import java.util.Vector; //... Vector v = new Vector( 100 ); v.add( "broccoli" ); v.add( "cauliflower" ); v.add( "carrots" ); v.add( "peas" ); // Note the semicolon after hasMoreElements(). for ( Enumeration e = v.elements(); e.hasMoreElements(); ) { String value = (String)e.nextElement(); // display each vegetable out.println( value ); }