Parameter | Hashmap | Hashtable |
---|---|---|
Synchronized | Not Syncronized | Syncronized |
Null key and Value | Allows one null key and any number of null values | Not allow null keys or values |
Fail fast | Iterator in Hashmap is fail fast | Enumeration in Hashtable is not fail fast |
ThreadSafe | No | Yes |
Extends | Extends AbstractMap class | Extends Dictionary class |
Performance | Faster then Hashtable | Slower then Hashmap |
Java Interview Java Script
Friday, 4 September 2015
Collection : Difference between HashMap and HashTable in Java ?
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment