Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Difference between ArrayList and Vector  RSS feed

 
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
Posts: 21048
85
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: 55333
157
  • 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
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!