what is the difference between HashMap and Hashtable
Answer Posted / chandan phukan
Two main differences between Hastable and HashMap are
1. Hashtable is synchronised but HashMap is not.
2. Hashtable does not allow "null" key but HashMap allows
"null" Key.
However one point to remember is that only one "null" key is
allowed in HashMap but multiple "null" values are allowed in
HashMap.
| Is This Answer Correct ? | 75 Yes | 9 No |
Post New Answer View All Answers
Is it possible to use string in the switch case?
What are the different conditional statements?
What kind of variables can a class consist?
What is a parameter used for?
What is difference between iterator access and index access?
How big is a boolean?
Can we have return statement in finally clause? What will happen?
What is dot operator?
What is numeric function?
What are the important features of Java 11 release?
What checkbox method allows you to tell if a checkbox is checked?
What are the different types of garbage collectors in java?
What is the difference between an array and an array list?
What is the use of accept () method in java?
What are the advantages of functions?