File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes difference between vector and array list Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "difference between vector and array list" Watch "difference between vector and array list" New topic

difference between vector and array list

vidhyasagar reddy
Ranch Hand

Joined: Jul 05, 2005
Posts: 40
Hai every body

vector is synchronized and arraylist is not synchronized

can any body explain me what happens we use the vector and arraylist in the servlet.
will it produce the same o/p
or not?
if possible provide me sample code
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24199

ArrayList is a replacement for Vector. Never use Vector in new code -- only use it when needed to interface with existing code that works with Vector.

I'm going to move this to Java in General (Beginner) for further discussion.

[Jess in Action][AskingGoodQuestions]
Tony Morris
Ranch Hand

Joined: Sep 24, 2003
Posts: 1608
When should I use java.util.Vector/java.util.Hashtable?

Tony Morris
Java Q&A (FAQ, Trivia)
jQuery in Action, 3rd edition
subject: difference between vector and array list
It's not a secret anymore!