Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

diff between Arraylist and vector

 
kapil bhate
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
 
Prakash Dwivedi
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.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
 
sever oon
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
 
kiran kiran
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