Vector in Java
Vector class implements a growable array of objects.
It’s an array, not a list.
Vector VS ArrayList
- Vectors are synchronized, ArrayLists are not.
- Data Growth Methods (ArrayList grow by ½ of its size, while Vector doubles)
Usage: ALWAYS use ArrayLists
The vector was not the part of collection framework, it has been included in collections later. It can be considered as Legacy code.
There is nothing about Vector which List collection cannot do. Therefore Vector should be avoided.