import java.util.Enumeration;Runtime:
import java.util.Vector;
public class Iterate_Vector_Enumeration {
public static void main(String[] args) {
Vectorvct = new Vector ();
//Elemente hinzufügen
vct.add("first");
vct.add("zweiter");
vct.add("third");
vct.add("fourth");
Aufzählungenm = vct.elements();
while(enm.hasMoreElements()){
System.out.println(enm.nextElement());
}
}
}
first
second
third
fourth
Please disable your ad blocker and refresh the window to use this website.