• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Urgent => WhichOne is Faster! ArrayList or Vector

 
Altaf Raja
Greenhorn
Posts: 5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
whichOne is faster!
Vector or ArrayList ???
urgent!!!
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
faster at doing what?

and I'm moving this:
from Servlets -> Java In General - Beginner
[This message has been edited by Mike Curwen (edited December 11, 2001).]
 
Marilyn de Queiroz
Sheriff
Posts: 9059
12
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Depends on whether you are using threads and need synchronization or not.
 
Steve Campbell
Ranch Hand
Posts: 41
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There have been discussions about this in the "performance" section.
 
David Weitzman
Ranch Hand
Posts: 1365
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The simple answer: ArrayList
Why? Vector has been around longer and developed into a sort of be-all do-all class with synchronization and support for many different API. ArrayList is a straitforward implementation of a List with no whistles or bells.
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic