Difference between HashMap and HashTable.
Difference between HashMap and HashTable can be seen below:
HashMap | HashTable |
---|
Methods are not synchronized | Key methods are synchronized |
Not thread safety | Thread safety |
Iterator is used to iterate the values | Enumerator is used to iterate the values |
Allows one null key and multiple null values | Doesn’t allow anything that is null |
Performance is high than HashTable | Performance is slow |