File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

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
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

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?
http://jqa.tmorris.net/GetQAndA.action?qids=53&showAnswers=true


Tony Morris
Java Q&A (FAQ, Trivia)
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: difference between vector and array list