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

How many functional interfaces does java 8 have?

1033


Is a string literal?

1106


In the below example, how many string objects are created?

1049


Is java good for beginners?

1019


What are the default and parameterized constructors?

1065


What is java objectoutputstream?

993


How do you sort arraylist in descending order?

1025


Is arraylist dynamic in java?

1001


Which is the best sorting technique in java?

989


What do you understand by classes in java?

1014


Explain about narrowing conversion in java?

1014


why we use merge option in hybernate pls give a ex snippet

1997


Which class cannot be a subclass in java?

1028


What are the main concepts of oops in java?

1759


How do you sing an Applet ?

2466