what is the difference between HashMap and Hashtable

Answer Posted / regalla naresh reddy

Hash Table is a legacy Class Whereas HashMap belongs to the
collections package.

HashMap allows null key and values..but it allows only one
null key and multiple null values...Whereas the HashTable
wont allow the null key and values..

Is This Answer Correct ?    15 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is boolean used for?

565


What is meant by overloading?

568


What is a for loop in java?

569


Is string an object?

624


What is serialversionuid?

539






What is the type of lambda expression?

518


Explain access specifiers?

628


What are the advantages of inner classes?

482


What flag up means?

577


How do you check if an arraylist is not empty?

555


what is a thread pool in java and why is it used?

506


Is hashmap thread safe?

537


What is nested loop? What is dangling else condition in it?

551


What is application tier?

510


Difference between ‘>>’ and ‘>>>’ operators in java?

612