Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between ArrayList and Vector

 
Vivek Nikam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vector is synchronized ArrayList is not
A Vector defaults to doubling the size of its array, while the ArrayList increases its array size by 50 percent.
Apart from this any other difference?
In which situation use ArrayList and in which Vector?
Vector is faster than ArrayList or not?javascript:emoticon
 
Rob Spoor
Sheriff
Pie
Posts: 20527
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

If you SearchFirst you will find several threads about the same question.
 
Campbell Ritchie
Sheriff
Posts: 48917
58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And a good place to start searching is here. the "list implementations" section will probably be the most helpful for your present question.
 
Vivek Nikam
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic