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 is the default size of arraylist in java?
What are the restrictions imposed by a Security Manager on Applets?.
Why destructor is not used in java?
Explain static nested classes ?
Why do we need wrapper classes?
What are the 4 versions of java?
What are the different http methods?
What is meant by the value of a variable?
What is the difference between member variables initialization and assignment in a constructor?
what is collatration?
What are the four integer types supported by java?
List the features of java programming language.
Name four container classes.
How variables are stored in memory?
How do you find the absolute value?