数组对象Vector用法

 1 import java.util.Vector;
 2 
 3 public class VectorTesting {
 4     public static void main(String[] args) {
 5         Vector<Object> _vector=new Vector<Object>();
 6         Integer intObj=new Integer(1);
 7         _vector.addElement(intObj);
 8         String strObj="1";
 9         _vector.addElement(strObj);
10         Boolean boolObj=false;
11         _vector.addElement(boolObj);
12         System.out.println(_vector.size());
13         
14         Boolean newObj=false;
15         _vector.set(0,newObj);
16         _vector.remove(newObj);
17         System.out.println(_vector.get(0));
18     }
19 }

 

posted @ 2013-08-30 11:01  fang_beny  阅读(530)  评论(0编辑  收藏  举报