what is the difference between HashMap And HashTable?

Answer Posted / stalin

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 ?    8 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What type of variable is error flag?

583


Is java a digit method?

512


Write code to implement bubble sort in java?

555


Why singleton pattern is better than creating singleton class with static instance?

532


How many types of threads are there in java?

502






What is the use of math abs in java?

547


Explain about the main() method in java?

567


What does the “final” keyword mean in front of a variable? A method? A class?

544


How do generics work in java?

518


What are measurable parameters?

565


Are strings immutable in java?

520


Give differences between Quicksort &Mergesort. When should these sorts be used andwhat is their running time in java?

676


Explain the importance of join() method in thread class?

636


What are the parts of a method?

533


What does system out println () do?

553