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

Is set ordered?

921


How many ways can an argument be passed to a subroutine and explain them?

963


What is the similarity between dynamic binding and linking?

1055


Can a class have a static inner class?

1029


What are static methods?

990


What is treemap in java?

898


Which is bigger double or float?

911


which one is more efficient int x; 1. if(x==null) 2.if(null==x) state which one either 1 or 2?

10953


How would you convert bytes to string?

937


What is a class in java?

960


Why are pointers not secure?

973


Does A Class Inherit The Constructors Of Its Superclass?

996


How do I know if java is installed?

1015


What will be the output of round(3.7) and ceil(3.7)?

1067


What are loops in java? What are three types of loops?

983