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's the access scope of protected access specifier?
Is an array a vector?
Is stringwriter thread safe?
Differentiate between the constructors and methods in java?
What is type inference in java8?
What is an abstract class and what is it’s purpose?
describe synchronization in respect to multithreading? : Java thread
Can we sort a map in java?
What is blank final variable?
Why do we need autoboxing in java?
What do you mean by exception handling in Java?
What is the purpose of using javap?
Difference between final and effectively final ? Why is effectively final even required ?
Which browsers work with java?
What is a arraylist in java?