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 are the different http methods?

519


How many bytes are a float?

497


Can we override singleton class?

528


What is type safety in java?

478


Does java vector allow null?

528






Why heap memory is called heap?

578


How many arguments can be passed to main ()?

518


Explain inner classes ?

640


What is derived datatype?

619


What is runtime locatable code?

848


Explain the scope or life time of class variables or static variables?

506


How many threads can java run?

548


What are wrapper classes in java?

586


Which class should you use to obtain design information about an object in java programming?

635


Why call by value prevents parameter value change?

575