Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes dif between vector() and ArrayList() Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "dif between vector() and ArrayList()" Watch "dif between vector() and ArrayList()" New topic
Author

dif between vector() and ArrayList()

santosh gunake
Greenhorn

Joined: May 20, 2006
Posts: 6
is there any difference between vector and arraylist other than synchronization
Arno Reper
Ranch Hand

Joined: Mar 14, 2006
Posts: 286
when you use vector its soooo slowly...but its because of the synchronized method, that 's why vector is deprecated...and you beter use arraylist who has the same possiblities

arno


The man who makes no mistakes does not usually make anything<br /> <br />>>> SCJP 5.0 >> SCJD B&S <<< In progress
Naseem Khan
Ranch Hand

Joined: Apr 25, 2005
Posts: 809
One more difference is in terms of growth of the collection

ArrayList increases its size by 50%.

Whereas, Vector increases its size by 200%.

regards

Naseem Khan
[ May 20, 2006: Message edited by: Naseem Khan ]

Asking Smart Questions FAQ - How To Put Your Code In Code Tags
wise owen
Ranch Hand

Joined: Feb 02, 2006
Posts: 2023
Vector or ArrayList -- which is better
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dif between vector() and ArrayList()