HashMap vs Hashtable
Two different
Hashtableis synchronized,HashMapis notHashtabledoes not allow null keys or values,HashMapdoes
Note: Should not use Hashtable for multiple threads application even it synchronized because Hashtable use synchronized for all methods (it’s not good for performance (check Hashtable code for more detail)). For multiple threads application, you can use ConcurrentHashMap.
Reference: https://stackoverflow.com/questions/40471/differences-between-hashmap-and-hashtable