Code example for Vector

Methods: add, firstElement

0
public final class VectorExample12 { 
 
  public static void main(String[] args) {
    try { 
      Vector v1 = new Vector();
      Vector v2 = new Vector();
      v1.removeAllElements();
      v2.add(new Object());
      v2.firstElement();
    } catch (Exception e) {
      e.printStackTrace();
    } 
  } 
}