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 / chandan

The key difference between the two is that access to the
Hashtable is synchronized on the table while access to the
HashMap isn't. You can add it, but it isn't there by default.

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.

And, a third difference is that HashMap permits null values
in it, while Hashtable doesn't.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differences between C and Java?

1132


Can list be final in java?

877


What are the pillars of java?

878


If an application has multiple classes in it, is it okay to have a main method in more than one class?

974


When is an object subject to garbage collection?

1005


What is reverse function?

1073


What is the use of predicate in java 8?

903


Explain try and catch keywords in java?

1151


What are the drawbacks of reflection?

968


What is immutable state?

954


What is meant by overloading?

1013


Why is the type for real numbers called double?

917


Why can't we make a class private in java?

990


What is namespace in java?

958


Can we change the scope of the overridden method in the subclass?

1333