Java Vector: Vector Is Like The Dynamic Array Which Can Grow or Shrink Its Size. Unlike Array, We
Java Vector: Vector Is Like The Dynamic Array Which Can Grow or Shrink Its Size. Unlike Array, We
Vector is like the dynamic array which can grow or shrink its size. Unlike array, we
can store n-number of elements in it as there is no size limit. It is a part of Java
Collection framework since Java 1.2. It is found in the java.util package and
implements the List interface, so we can use all the methods of List interface here.
o Vector is synchronized.
o Java Vector contains many legacy methods that are not the part of a
collections framework.
System.out.println("Elements are: "+vec);
}
}