File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes diff between Arraylist and vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "diff between Arraylist and vector" Watch "diff between Arraylist and vector" New topic
Author

diff between Arraylist and vector

kapil bhate
Greenhorn

Joined: Mar 04, 2004
Posts: 15
please anybody tell me diff. between arraylist and vector?and which is better to use ?also i know only differnce is that vector is Syncronized
Prakash Dwivedi
Ranch Hand

Joined: Sep 28, 2002
Posts: 452
I dont think this is a jsp question.
APart from the difference you have mentioned, in Vector you can set the increment value.


Prakash Dwivedi (SCJP2, SCWCD, SCBCD)
"Failure is not when you fall down, Its only when you don't get up again"
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61316
    
  66

Moving to the Java in General(intermediate) forum


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sever oon
Ranch Hand

Joined: Feb 08, 2004
Posts: 268
The main difference is that Vector is synchronized. More minor differences--it was retrofit into the Collections API and therefore isn't as standard as ArrayList, which was provided as a new part of the Collections API. As far as I can see, when writing new code there is absolutely no reason to use Vector at all...I always prefer ArrayList, even if I need a synchronized one:

sev
kiran kiran
Greenhorn

Joined: Dec 04, 2003
Posts: 12
What are the advantages of using arraylist compared to vector?
 
GeeCON Prague 2014
 
subject: diff between Arraylist and vector