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 / tarun kumar

class Hashtable was part of the original java.util and is a
concreate implementation of a Dictionary class. In java2 it
is reengineering it so that it also implements the Map
interface.
Thus it is now integrated into the collections framework.

class HashMap implements Map interface.

Because, Hashtable is a concreate implementation of
Dictionary class, is Legacy class, all legacy classes are
synchronized. So,thats why Hashtable is sunchronized.

I can say that both Hashtable and HashMap are same, accept
synchronization.

Is This Answer Correct ?    22 Yes 25 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is illegal identifier in java?

974


What are the different data types in java?

957


What is difference between calling start() and run() method of thread?

1049


Give me example of derived data types.

1102


Why java is said to be pass-by-value ?

991


What is the effect of keeping a constructor private?

887


What is string builder?

845


Why collection doesn’t extend cloneable and serializable interfaces?

1058


Difference between start() and run() method of thread class?

1011


Why webdriver is an interface?

1004


Explain wrapper classes in java?

946


What are the types of literals?

1100


Can we create object of static class?

977


What is the point of java?

977


What are the 3 types of loops in java?

1004