File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Urgent => WhichOne is Faster! ArrayList or Vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Urgent => WhichOne is Faster! ArrayList or Vector" Watch "Urgent => WhichOne is Faster! ArrayList or Vector" New topic
Author

Urgent => WhichOne is Faster! ArrayList or Vector

Altaf Raja
Greenhorn

Joined: Dec 05, 2001
Posts: 5
hi,
whichOne is faster!
Vector or ArrayList ???
urgent!!!
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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

Joined: Jul 22, 2000
Posts: 9044
    
  10
Depends on whether you are using threads and need synchronization or not.


JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Steve Campbell
Ranch Hand

Joined: Dec 18, 2000
Posts: 41
There have been discussions about this in the "performance" section.
David Weitzman
Ranch Hand

Joined: Jul 27, 2001
Posts: 1365
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Urgent => WhichOne is Faster! ArrayList or Vector
 
Similar Threads
which is faster in List Classes
array size?
Best Collection (Urgent)
URGENT!!!
Mnemonics for the SCJP?