Difference between ArrayList and Vector in Java

The following table shows the main differences between 'ArrayList' and 'Vector' in Java Technology.


ArrayList

Vector
1
ArrayList uses java.util.ArrayLIst class

Vector uses java.util.Vector class
2
ArrayList increases by half of its size when its size is increased.
Vector doubles the size of its array when its size is increased.
3
All methods of ArrayList are not synchronized and hence it is not thread – safe.
All the methods of Vector are synchronized and hence it is thread – safe.
4
Performance is High because of methods of ArrayList is not synchronized.
Performance is Low because of methods of Vector is synchronized.
5

The default size for ArrayList is 10.
The default size for Vector is 10.
6
Not suitable for use in multi – threading environment.
Suitable for use in multi – threading environment.
7
ArrayList returns iterator and ListIterator of items.

Vector returns Enumeration of items.

8
Use ArrayList as much as possible.
Avoid use of Vector until you have no choice to use.