Difference between Hash Table and Hash Map?

Answer Posted / ravikiran

HashTable is the collection which is legacy.Which doenn't
allows null keys and null values.And methods access is
synchronized.
HashMap is the collection which can allow one null key and
multiple null values.And methods access is not synchronized.

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is ordered map in java?

749


what is the purpose of the runtime class?

766


What are instance variables?

805


What is hash in java?

695


Can a class be declared as protected?

727


Explain which of the following methods releases the lock when yield(), join(),sleep(),wait(),notify(), notifyall() methods are executed?

834


How do constructors use this() and super()?

776


What is the hashcode () and equals () used for?

730


What is the purpose of encapsulation?

739


What is math exp in java?

744


Which is dependent variable?

659


Can we declare an array without size in java?

703


What is stack example?

763


How many types of string data types are there?

743


Is ++ operator thread-safe in java?

858