Back to Top

Sunday, 15 January 2012

JAVA : Difference between HashMap and HashTable?

 The HashMap class is roughly equivalent to Hashtable, except that it is unsynchronized and permits nulls. (HashMap allows null values as key and value whereas Hashtable doesnt allow). HashMap does not guarantee that the order of the map will remain constant over time. HashMap is unsynchronized and Hashtable is synchronized.

2 Responses to “ JAVA : Difference between HashMap and HashTable? ”

java hashtable said...
25 September 2012 at 14:14

One of the key difference between Hashtable vs HashMap in Java is performance, Hashtable is way slower than HashMap.


Anonymous said...
18 December 2014 at 21:54

nice explanation.
get more on http://instanceofjavaforus.blogspot.in/2014/10/interview-questions-and-answers.html


Post a Comment

Popular Posts

Subscribe via Email
Subscribe Java Interview Questions via Email
All Rights Reserved JAVA INTERVIEW QUESTIONS | Privacy Policy | Anijit Sarkar