import java.util.Enumeration; import java.util.Vector; public class MainClass { public static void main(String args[]) throws Exception { Vector v = new Vector(); v.add("a"); v.add("b"); v.add("c"); for (Enumeration e = v.elements(); e.hasMoreElements();) { Object o = e.nextElement(); System.out.println(o); } } }
a b c