• Post Reply Bookmark Topic Watch Topic
  • New Topic

diff between Arraylist and vector  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please anybody tell me diff. between arraylist and vector?and which is better to use ?also i know only differnce is that vector is Syncronized
 
Ranch Hand
Posts: 452
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I dont think this is a jsp question.
APart from the difference you have mentioned, in Vector you can set the increment value.
 
Author and ninkuma
Marshal
Posts: 66307
152
IntelliJ IDE Java jQuery Mac Mac OS X
 
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The main difference is that Vector is synchronized. More minor differences--it was retrofit into the Collections API and therefore isn't as standard as ArrayList, which was provided as a new part of the Collections API. As far as I can see, when writing new code there is absolutely no reason to use Vector at all...I always prefer ArrayList, even if I need a synchronized one:

sev
 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the advantages of using arraylist compared to vector?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!