RE: What is the difference between HashTable and HashMap?
Hashtable is synchronized means it's therad safe where as hashmap is not and hash table can't store null value hashmap can store null values. HashTable is thread safe is because it makes lock in it when it executes get() or put() methods. It is good one when you use the data in an multi-threading application. You may try use hashmap inside synchronized block.
RE: What is the difference between HashTable and HashMap?
Hashtable does not allow null values or null keys whereas hash map allows null keys and null values. Hashtable is synchronzied whareas hashmap is not synchronized. In case of single thread using hashmap is faster than the hashtable. In case of multiple thereads using hashtable is advisable.