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

Explain naming conventions for packages?

806


How many bytes is double?

773


What is thread start?

748


What is final, finally, finalize?

817


What is t in parametric equations?

780


What about interrupt() method of thread class ?

866


What is difference between word and integer?

837


How do you declare a destructor in java?

739


Can an arraylist be empty?

821


Can we sort hashmap in java?

760


What is entry set in java?

771


What is the difference between the paint() and repaint() methods in java programming?

931


What does file separator do in java?

783


Explain a few methods of overloading best practices in java?

776


Garbage collection in java?

812