Wednesday, February 21, 2007

Basic difference between Array List and Vector in Java

1 comment:

Contact: highbrow.admin@gmail.com said...

1.Vector is a legacy class but ArrayList is not.
2.Vector is thread safe but ArrayList is not.
3.Vectors are synchronized while array list are not.
4.ArrayList give better performance as Vector has to suffer this due to synchronisation.
5.Vectors grows double in size while array list grows just 50%.
6.Vector having default size 10 ArrayList is 16.