This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Array vs List vs Vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Array vs List vs Vector" Watch "Array vs List vs Vector" New topic

Array vs List vs Vector

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15300

In most of my applications I have been using Arrays and Lists to store my objects. I usually use Arrays for a temp storage area until I am ready to put them in a List since a List is dynamic and can grow and shrink.
I took a look at the Vector API and it looks very similar to that of List. Could anyone tell me if one is better than the other for storing String Objects in memory?
What would be the pros and cons of Vector vs List.

Happy Coding,
Gregg Bolinger

GenRocket - Experts at Building Test Data
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

I am moving this thread to the Java In General, Intermediate forum. Please continue the discussion in that forum.
- satya

Take a Minute, Donate an Hour, Change a Life
I agree. Here's the link:
subject: Array vs List vs Vector