Organizational Research By

Surprising Reserch Topic

Question:Difference between HashMap and HashTable?



asked Sep 13, 2013 in Java Interview Questions by rajesh
edited Sep 12, 2013
0 votes
28 views



Related Hot Questions

2 Answers

0 votes
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.
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes
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.
answered Sep 13, 2013 by rajesh
edited Sep 12, 2013

...