Saturday, July 02, 2005

Vector or ArrayList

Checked this site : Vector or ArrayList. Vectors are synchronized, while ArrayList is unsynchronized(making them not thread-safe). A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent(when full)...

2 comments:

Jayaprabhakar said...

Have a look at this page

http://skeletoncoder.blogspot.com/2006/09/java-tutorials-arraylist-or-vector.html

It gives a sample program on when to use what, and also illustrates the problems with ArrayList.

Jayaprabhakar said...


Java Tutorials: ArrayList or Vector?