File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Urgent => WhichOne is Faster! ArrayList or Vector" Watch "Urgent => WhichOne is Faster! ArrayList or Vector" New topic

Urgent => WhichOne is Faster! ArrayList or Vector

Altaf Raja

Joined: Dec 05, 2001
Posts: 5
whichOne is faster!
Vector or ArrayList ???
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

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

"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.
subject: Urgent => WhichOne is Faster! ArrayList or Vector
It's not a secret anymore!