Collection---------Vector's unique features

一.Vector's unique features

1.Vector class overview 2.Vector class unique features

   public void addElement(E obj)    public E elementAt(int index)    public Enumeration elements()
package com.pg.list;

Import java.util.Enumeration;
Import java.util.Vector;

Public class Demo5_Vector {

/**
* @param args
*/
Public static void main(String[] args) {
Vector v = new Vector();
v.addElement("a");
v.addElement("b");
v.addElement("c");
v.addElement("d");

Enumeration en = v.elements(); //Get the enumeration
While(en.hasMoreElements()) { //Determine whether there are elements in the collection
System.out.println(en.nextElement()); //Get the elements in the collection
}
}

}