This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
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

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’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: dif between vector() and ArrayList()
jQuery in Action, 3rd edition