This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Differences between vector and arraylist

 
Anwar Hussain
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic