what is the difference between HashMap and Hashtable
Answer Posted / ashad
Hash Table is a legacy Class Whereas HashMap belongs to the
collections package.
HashMap allows null key and values..but it allows only one
null key and multiple null values...Whereas the HashTable
wont allow the null key and values..
HashMap allows only one null key, basic idea behind it is
that key can have unique value only if one null is assigned
to a key next null will be duplicate.
| Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
Java is Pass by Value or Pass by Reference?
Tell me a few examples of final classes defined in Java API?
Does java map allow duplicates?
How do you include a string in java?
how can i use a nonsynchronized hashtable?
Is minecraft 1.15 out?
What is difference between identifier and variable?
What is an example of a boolean?
How can we make string upper case or lower case?
Differentiate between stringbuffer and string?
how to handle exceptions in ejb?
Why string is immutable with example?
What are different access specifiers in java? Explain
What is a byte string?
What is treeset in java?