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 do you mean by aggregation?
What are the different http methods?
What is abstract class? Explain
What is cr keyboard?
when you will synchronize a piece of your code? : Java thread
what is the significance of listiterator in java?
what are synchronized methods and synchronized statements? : Java thread
what is encapsulation in java? Explain
What is the difference between scrollbar and scrollpane?
What is proper subset?
What are reference variables in java?
What is the collections api?
What does the append?
What is the use of join method?
Is the milky way in a void?