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 a constructor overloading in java?
Is there any way to skip finally block of exception even if some exception occurs in the exception block?
How do you bind variables?
Difference between character constant and string constant in java ?
What is pre increment and post increment in java?
What is the difference between jdk, jre, and jvm?
What is the difference between the ">>" and " >>>" operators in java?
Is alive in java?
What will be the output of round(3.7) and ceil(3.7)?
What is blank final variable?
What is classname class in java?
Is null false in java?
Is arraylist an object in java?
Does java support function overloading, pointers, structures, unions or linked lists?
What is a flag and how does it work?