Tech Me More

To quench our thirst of sharing knowledge about our day to day experience & solution to techincal problems we face in our projects.

Advertise with us !
Send us an email at

Wednesday, September 17, 2014

Differences between ArrayList and Vector in Java

One of the most frequently asked question in java is what are the main differences between Vector and ArrayList ? Both Vector and ArrayList implements List interface, there are some differences in both classes.

Below are the few main differences between both the class.

Differences between ArrayList and Vector

All methods of ArrayList are non-synchronized.
Most of the methods of Vector class are synchronized.
They are not thread safe.
They are thread safe.
Multiple threads can operate at a same time.
Only one thread can operate at a time.
Relatively performance is high as multiple thread are allowed to operate at a time.
Performance is relatively low as compare to ArrayList.
ArrayList was introduced in java 1.2 versions; hence it is non – legacy class.
Vector was introduced in java 1.0, hence Vector class is known as legacy class.

No comments: