what is difference betwwen hashmap and hashtable ?

Answer Posted / ravikiran

hashmap allows one null key and multiple null values.
hashtable doesn't allow null elements
hashmap is not synchronized
hashtable is snchronized
hashmap is not legacy
hashtable is legacy

Is This Answer Correct ?    6 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare a destructor in java?

505


Is string a class in java?

509


Which collection is best for sorting in java?

692


What are the restrictions imposed by a Security Manager on Applets?.

2061


How do you define a variable?

538






How many JVMs can run on a single machine and what is the meaning of Just-In-Time (JIT) compiler?

753


Which is better stringbuilder or stringbuffer?

526


Where and how can you use a private constructor?

536


What are untrusted applets?

587


What is a method vs function?

555


What is hashmap and map?

553


Explain importance of throws keyword in java?

564


How does callback work in java?

605


What is the difference between break and continue statements?

547


How can we use primitive data types as objects?

556