my dog learned polymorphism
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "dif between vector() and ArrayList()" Watch "dif between vector() and ArrayList()" New topic

dif between vector() and ArrayList()

santosh gunake

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


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


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:
subject: dif between vector() and ArrayList()
It's not a secret anymore!