import java.util.Enumeration;런타임:
import java.util.Vector;
public class Iterate_Vector_Enumeration {
public static void main(String[] args) {
Vectorvct = new Vector ();
//요소 추가
vct.add("first");
vct.add("초");
vct.add("세 번째");
vct.add("넷째");
열거형<문자열> enm = 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.