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() ) ; } } }