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 join () in java?

534


Explain working of call by reference function invoking.

598


What are instance variables?

619


What is meant by null and void?

546


What is <> used for in java?

678






What is an immutable object? How do you create one in java?

608


What does indexof mean?

542


Why for each loop is used?

508


What is jagged array in java?

540


What is the function of compareto in java?

597


Write a function to find out longest palindrome in a given string?

600


how we can make a write-only class in java?

565


how to convert Java project into Maven ?

593


Can substring create new object?

566


Does set allows null in java?

514