Enumerate through a Vector using Java Enumeration
import java.util.Enumeration; import java.util.Vector; public class Main { public static void main(String[] args) { Vector<String> v = new Vector<String>(); v.add("One"); v.add("Two"); v.add("Three"); v.add("Four"); Enumeration e = v.elements(); while (e.hasMoreElements()) System.out.println(e.nextElement()); } }