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 is aggregation in java?
How to perform quicksort in java?
How do you use wildcards?
Is alive and join method in java?
What is an arraylist in java?
What is type parameter in java?
Why should I use abstract class?
What is difference between call by value and call by reference?
What are the application of stack?
Is java still relevant?
What is class variable java?
In how many ways we can do exception handling in java?
What is a memory leak in java?
Discuss 2D arrays.
How many types of array are there?