what is the difference between HashMap And HashTable?

Answer Posted / stalin

The HashMap class is roughly equivalent to Hashtable, except
that it is unsynchronized and permits nulls. (HashMap allows
null values as key and value whereas Hashtable doesnt
allow). HashMap does not guarantee that the order of the map
will remain constant over time. HashMap is unsynchronized
and Hashtable is synchronized

Is This Answer Correct ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can we increase size of array?

771


What is string syntax?

817


How many times finalize method will be invoked? Who invokes finalize() method in java?

791


Explain garbage collection in java?

749


What is local class in java?

780


explain local datetime api in java8?

781


What is linkedlist in java?

738


What is the use of parse function in java?

723


What is method overloading and method overriding?

770


What is a variable in java?

746


What is broken and continue statement?

762


Program to Find the second largest element in an array.

826


What is a newline character in java?

792


What is enhanced loop in java?

751


What is anagram in java?

718