Tuesday, October 18, 2011

Hashtable vs HashMap

HashTableHashMap
SynchronizedUnsynchronized
Does not allow null keys or valuesAllows one null key and any number of null values
Extends DictionaryExtends AbstractMap
Default capacity is 11Default capacity is 16
                     Both implement the Map interface
                     Default load factor of 0.75, then they resize


I also read that HashMap does not guarantee the order of the map to remain constant over time.

No comments:

Post a Comment