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
What is object cloning in Java?
List down the methods and interfaces of collection class in java.
What is the default value of an object reference declared as an instance variable?
Explain the transient field modifier?
why java does not support unsigned keyword?
How can you share data between two thread in Java?
what is meant wrapper classes?
What is args length in java?
What do you mean by ordered and sorted in collections in java?
Name few java util classes introduced with java 8 ?
How do you check whether the list is empty or not in java?
Which package is imported by default?
What is a parameter in java?
What is a default constructor and also define copy contrucyor?
What is a variable analysis?