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

What is tostring () method?

745


Does java support function overloading, pointers, structures, unions or linked lists?

788


What does this () mean in java?

730


What is defined as false sharing in the context of multithreading?

739


What is instance example?

700






What is the symbol for space?

736


Why string is not a wrapper class?

844


How many bytes are a float?

688


Is string a class in java?

708


How transient variable is different from volatile variable?

740


What is methods in java?

738


What is this keyword used for?

858


Explain access modifiers in java.

756


What is difference between checked and unchecked exception in java?

767


What is a modifier?

1124