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 / jyotsna gupta

1. Hashtable is synchronized where as hashmap is not.
2. Hashmap can contains null values as the keys and as well as values.But Hashtable dose not allow null values as keys and values.
3. Another difference is that iterator in the HashMap is fail-safe while the enumerator for the Hashtable isn't. If you change the map while iterating, you'll know.
4. Hashmap is faster than Hashtable.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why java uses the concept of the string literal?

1054


Lowest Common ancestor in a Binary Search Tree and Binary Tree.

929


What is exception hierarchy in java?

1006


What are Normalization Rules? Define Normalization?

1050


What is the difference between Array and Hash Table?

1026


Explain importance of throws keyword in java?

975


What is jagged array in java?

1079


What is the this keyword?

1025


What is the difference between choice and list?

1086


What is e java?

1093


Explain abstract class in java?

1062


How do you insert a line break?

904


Why does it take so much time to access an applet having swing components the first time?

1922


What is substring in java?

1214


What is thread pool? How can we create thread pool in java?

1063