aspose file tools*
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
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Array vs List vs Vector" Watch "Array vs List vs Vector" New topic
Author

Array vs List vs Vector

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

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.
Thanks

------------------
Happy Coding,
Gregg Bolinger


GenRocket - Experts at Building Test Data
Madhav Lakkapragada
Ranch Hand

Joined: Jun 03, 2000
Posts: 5040

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

Take a Minute, Donate an Hour, Change a Life
http://www.ashanet.org/workanhour/2006/?r=Javaranch_ML&a=81
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Array vs List vs Vector