what is the difference between HashMap and Hashtable

Answer Posted / arun rajesh

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 ?    54 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can this keyword be used to refer static members?

551


Can a class extend 2 classes in java?

562


What is a constructor overloading in java?

530


Who is the owner of java?

544


How do you sort arraylist in descending order?

580






How many types of flags are there?

526


Where is the find and replace?

538


What will happen to the exception object after exception handling?

580


Explain what access modifiers can be used for variables?

593


What is unsigned char?

629


Describe what happens when an object is created in java ?

553


What is the advantage of preparedstatement over statement?

570


How can you generate random numbers in java?

589


Why java doesn’t support multiple inheritances?

588


What are the important features of Java 8 release?

582