Tuesday, June 26, 2012

What are key differences between ArrayList vs Vector in Java ?


Vectors are synchronized, ArrayLists are not.
Vectors are safe-thread as Vectors are synchronized

Both are dynamically resizable.
By default, Vector doubles the size of its array when its size is increased.
But, ArrayList increases by half of its size when its size is increased

No comments:

Post a Comment