Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is the difference between HashMap and Hashtable

Answer Posted / ashad

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..


HashMap allows only one null key, basic idea behind it is
that key can have unique value only if one null is assigned
to a key next null will be duplicate.

Is This Answer Correct ?    10 Yes 9 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Java is Pass by Value or Pass by Reference?

1004


Tell me a few examples of final classes defined in Java API?

1035


Does java map allow duplicates?

849


How do you include a string in java?

936


how can i use a nonsynchronized hashtable?

2536


Is minecraft 1.15 out?

931


What is difference between identifier and variable?

1003


What is an example of a boolean?

1012


How can we make string upper case or lower case?

1034


Differentiate between stringbuffer and string?

995


how to handle exceptions in ejb?

2267


Why string is immutable with example?

919


What are different access specifiers in java? Explain

1070


What is a byte string?

1060


What is treeset in java?

951