File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes EXCEPT SYNCHRONIZATION what are the main diff between ArrayList and Vector Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "EXCEPT SYNCHRONIZATION what are the main diff between ArrayList and Vector" Watch "EXCEPT SYNCHRONIZATION what are the main diff between ArrayList and Vector" New topic
Author

EXCEPT SYNCHRONIZATION what are the main diff between ArrayList and Vector

Mortin kim
Ranch Hand

Joined: Nov 15, 2007
Posts: 44
EXCEPT SYNCHRONIZATION what are the main diff between ArrayList and Vector..?

and HashTable and HashMap..?


Thanks
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24054
    
  13

You tell us what the differences are, and we'll tell you which ones are the main ones (start by reading the Javadocs for each class.)


[Jess in Action][AskingGoodQuestions]
Rupali Sarolkar
Greenhorn

Joined: Nov 20, 2007
Posts: 13
I think Synchronization (i.e. Thread safety) is the main difference. Because of which one more thing comes into picture that is "speed(or performance)" of the operations on these collection objects.

When you know that there will not be multiple threads accesing the collection object you should use the ArrayList instead of vector.

-Rupali
SCJP , SCWCD.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19216

Hashtable does not allow null as key or value, HashMap does.


SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: EXCEPT SYNCHRONIZATION what are the main diff between ArrayList and Vector
 
Similar Threads
Diff between Vector and ArrayList(implementation Diff)
Vector deprecated in 1.3?
vector and arraylist
What is the difference between ArrayList and Vector?
Synchronization