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

Is singleton thread safe in java?

549


What are java annotations?

649


What is a package in java? List down various advantages of packages.

762


Can an anonymous class be declared as implementing an interface and extending a class in java programming?

651


Difference between string s= new string (); and string s = "abv";?

744






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

597


What is console based application in java?

548


Should you use singleton pattern?

528


List primitive java types?

598


Can a constructor have different name than a class name in java?

599


What is int lol?

596


Is ruby built on java?

537


How do you reverse sort in java?

508


How many ways can an argument be passed to a subroutine and explain them?

584


Can private class be inherited in java?

555