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 integer of 16?
What do you understand by Header linked List?
What technique is carried out to find out if a particular string is empty?
What is meant by collection in java?
What is int lol?
Why volatile is used in java?
Can a private method of a superclass be declared within a subclass?
Explain about public and private access specifiers?
Why constructor has no return type?
what is aggregation in java?
What are user defined exceptions?
Write a program to print count of empty strings in java 8?
What is the size of string?
What is a copy constructor in java?
how we can create packages in java?