vector in java

Java
// Java code illustrating add() method 
import java.util.*; 
class Vector_demo { 
    public static void main(String[] arg) 
    { 
  
        // create default vector 
        Vector v = new Vector(); 
  
        v.add(1); 
        v.add(2); 
        v.add("geeks"); 
        v.add("forGeeks"); 
        v.add(3); 
  
        System.out.println("Vector is " + v); 
    } 
}

Source

Also in Java: