Iterator interface is expected to supplant the Enumeration interface : Iterator « Utility Classes « SCJP






import java.util.Iterator;
import java.util.Vector;

public class MainClass{
    public static void main(String[] argv){
         Vector v = new Vector();
         v.add("a");
         v.add("b");
         v.add("c");
         Iterator isL = v.iterator();
         while ( isL.hasNext() ) {
            System.out.println( isL.next() ) ;
         }   
    }
}








8.27.Iterator
8.27.1.Iterator interface is expected to supplant the Enumeration interface
8.27.2.The Iterator Interface replaces the Enumeration interface.