Difference Between Hashtable and Hashmap….
1. Hash table does not permit null key while Hash map allow both null key and value.
2. Hash table is synchronized, while Hash map is not. if we need to synchronized it, we have to do it externally.
3. Hash map work with Iterator where older Hash table work with Enumeration.
4. As because Hash map is not synchronized, it is faster than Hash table.
5. Hash table work best with capacities that are prime number. Hash map round.
Share the knowledge