Difference between HashMap and HashTable?

Q

Difference between HashMap and HashTable?

✍: Guest

A

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 doesnt allow). HashMap does not guarantee that the order of the map will remain constant over time. HashMap is unsynchronized and Hashtable is synchronized.

2013-04-25, 1931👍, 0💬