what is the difference between HashMap and Hashtable
Answer Posted / chandan
The key difference between the two is that access to the
Hashtable is synchronized on the table while access to the
HashMap isn't. You can add it, but it isn't there by default.
Another difference is that iterator in the HashMap is
fail-safe while the enumerator for the Hashtable isn't. If
you change the map while iterating, you'll know.
And, a third difference is that HashMap permits null values
in it, while Hashtable doesn't.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What are the benefits of operations in java?
How to implement a multithreaded applet?
What does main method?
What is proper subset?
When is the arraystoreexception thrown?
How many bits is size_t?
Difference between concurrent hashmap and hashtable and collections
Does java map allow duplicates?
Give differences between Quicksort & Mergesort. When should these sorts be used and what is their running time?
What is the use of arraylist in java?
If a class is declared without any access modifiers, where may the class be accessed in java programming?
What does math floor () do?
What is downcasting?
What is the SimpleTimeZone class?
Is java se open source?