Newbie蔡  
 1 import java.util.Enumeration;
 2 import java.util.Vector;
 3 
 4 public class Test4 {
 5 
 6     public static void main(String[] args) {
 7         Vector v = new Vector();
 8         
 9         v.addElement("abc1");
10         v.addElement("abc2");
11         v.addElement("abc3");
12         v.addElement("abc4");
13         
14         Enumeration en = v.elements();     //Vector特有的方法。   Enumeration枚举        已不再用了,了解就行
15         while (en.hasMoreElements())
16         {
17             System.out.println("nextelement:"+en.nextElement());
18         }
19 
20     }
21 
22 }

 

posted on 2016-08-23 14:30  Newbie蔡  阅读(354)  评论(0)    收藏  举报