This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Differences between vector and arraylist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Differences between vector and arraylist" Watch "Differences between vector and arraylist" New topic

Differences between vector and arraylist

Anwar Hussain
Ranch Hand

Joined: Jul 24, 2009
Posts: 35
Hi ,

I have got two difference

Vector is a legacy class
where as ArrayList is not a legacy class.

Vector is synchronized but ArrayList is not.

Any more differences please let me know.
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183
That is pretty much the only difference between Vector and ArrayList. Same with StringBuilder and StringBuffer.

Both synchronized versions are legacy and should not be used.

JDBCSupport - An easy to use, light-weight JDBC framework -
wood burning stoves
subject: Differences between vector and arraylist
Similar Threads
Legacy Methods
Generics related warning in Vector add method
ArrayList vs Vector
What is the difference between Vector and ArrayList
Difference between Vector and ArrayList classes