Vector Class In Java
Java.util.Vector Class in Java
List interface has third implementation class is Vector. Vector is only synchronized class in List interface. Vactor class is legacy class but not fully compatible with the collection. Vector is very useful if you don't know the size of the array. In the Vector if elements exceed the capacity Vector increments 100% means double the array size if a total number of elements exceeds than its capacity.
- In the Vector class, Implements a dynamic array that means it can increase or shrink as required.
- It is quite similar to ArrayList but Vector is synchronized and has some legacy method which collection framework does not contain.
- It extends AbstractList and implements List interfaces.
post a comment