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
What does a method signature consist of?
Can we sort a map in java?
What is identifier give example?
What is the use of callablestatement?
What is the r character?
What is function and its uses?
How do you detect memory leaks?
What is difference between final and finally in java?
Explain the meaning of java applet.
What is implicit object in java?
What is xslt in java?
How do you join strings in java?
What is collection api?
Which java version is latest?
Can a class be a super class and a sub-class at the same time? Give example.