ContactUs :

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

Difference between HashMap and Hashtable ?


HashMap lets you have null values as well as one null key.
HashTable  does not allows null values as key and value.
The iterator in the HashMap is fail-safe (If you change the map while iterating, you’ll know).
The enumerator for the Hashtable is not fail-safe.
HashMap is unsynchronized.
Hashtable is synchronized.
Note: Only one NULL is allowed as a key in HashMap. HashMap does not allow multiple keys to be NULL. Nevertheless, it can have multiple NULL values.

Related Posts Plugin for WordPress, Blogger...
Flag Counter