Difference between HashMap and HashTable
Tutorials Shared by the Internet Community
Total Hits - 33111
Total Votes - 101 votes
Vote Up - 44 votes
Vote Down - 57 votes
Domain - javarevisited.blogspot.com
Category - JAVA/Collections
Submitted By - Javin Paul
Submitted on - 2011-02-05 08:21:15
This question oftenly asked in interview to check whether candidate understand correct usage of collection classes and aware of alternative solutions available.
1. 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 doesn't allow nulls). More detail...