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

Is list ordered in java?

921


Is ruby built on java?

897


What is a parameter in simple terms?

937


What are variable names?

910


Which command from the jdk compiles a java program?

916


What an i/o filter?

945


Can we declare a constructor as final?

1206


Give few examples of final classes defined in Java API?

1112


Can variables be used in java without initialization?

1020


How do you create an array in java?

939


What is the main advantage of passing argument by reference?

909


What is bufferedwriter?

916


Write a program to check for a prime number in java?

991


Can I uninstall java?

977


Can we declare array without size in java?

959