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 the difference between abstraction and encapsulation?
When the constructor of a class is invoked?
What is the difference between object oriented programming language and object based programming language?
Write a program to solve producer consumer problem in java?
How many wrapper classes are there in java?
Why synchronization is important?
What is size_t?
How can you traverse a linked list in java?
What do you mean by ordered and sorted in collections in java?
Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain
Do you need to import math in java?
Can a source file contain more than one class declaration?
What is a “stateless” protocol ?
What is finally and finalize in java?
What is class level lock ?