Vector class

Vector was part of Java since 1.0 and also comes under legacy classes. It extends AbstractList class and implements List interface.

Features of Vector
1. Vector is similar to ArrayList but it is synchronized.
2. Vector contains few legacy methods that are not the part of a collections framework.
3. Vector implements a dynamic array it means it can grow or shrink and also access its elements through index as an array.

Constructors
1. public Vector()
This constructor is used for creating a default Vector. Its initial size is 10.

2. public Vector(int size)
This constructor is used to describe the initial size of the arguments in Vector.

3. public Vector(int size, int increment)
This constructor is used to create a vector whose initial capacity is given by size and whose increment is specified by increment.

4. public Vector(Collection c)
This constructor creates a vector that contains the elements of a collection c.

HashMap class hierarchy
public class Vector extends AbstractList implements List