Vector Class in Java
Vector Class in Java
The Vector class implements a growable array of objects. Vectors fall in legacy classes,
but now it is fully compatible with collections.
Vector Constructor:-
1. Vector():- Creates a new empty vector size 10 and capacity increment 0
ex. Vector v = new Vector();
2. Vector(int Initial Capacity) : Creates a new empty vector with specified capacity and
with capacity increment 0
ex. Vector v = new Vector(20);