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
How do you read and print a string in java?
Explain the importance of throwable class and its methods?
Why arraylist is used in java?
Can a method be overloaded based on different return type but same argument type?
Does java allow overriding static methods ?
What is the purpose of nested class in java?
What is the java virtual machine?
What is the purpose of using java.lang.class class?
What is the meaning of flag day?
What is the difference between Java and C++?
What is object class in java?
What is enhanced loop in java?
What is int short for?
Explain jdk, jre and jvm?
Define the term string pool?