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 scope & storage allocation of static, local and register variables? Explain with an example.
Explain access modifiers in java.
How objects of a class are created if no constructor is defined in the class?
What is an empty class? What functionality does it offer in Java?
How do you ensure that n threads can access n resources without deadlock?
Where to store local variables?
Is minecraft 1.15 out?
How can you write a loop indefinitely in java programming?
how does the run() method in runnable work? : Java thread
How do I remove a character from a string in java?
Java is pass by value or pass by reference? Explain
Is .net better than java?
How long will it take to learn java?
What is nullpointerexception?
Is string serializable in java?