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 difference betwwen hashmap and hashtable ?

Answers were Sorted based on User's Feedback



what is difference betwwen hashmap and hashtable ?..

Answer / deep pratap singh

HashMap HashTable
1> Not Synchronized Synchronized
2> can contain null cann't

You may also make HashMap Synchronized using generic
methods. Using Hashtable is bad habit. Try to avoid it.

Is This Answer Correct ?    10 Yes 2 No

what is difference betwwen hashmap and hashtable ?..

Answer / ravikiran

hashmap allows one null key and multiple null values.
hashtable doesn't allow null elements
hashmap is not synchronized
hashtable is snchronized
hashmap is not legacy
hashtable is legacy

Is This Answer Correct ?    6 Yes 0 No

what is difference betwwen hashmap and hashtable ?..

Answer / ajay yadav

Hash Map allows null values.
Hash Table dont allows null values.

Is This Answer Correct ?    4 Yes 0 No

what is difference betwwen hashmap and hashtable ?..

Answer / javablossom

The Iterator is used in the hashmap is fail-safe and
whereas the Enumerator used in hashtable is not fail-safe.

Is This Answer Correct ?    1 Yes 0 No

what is difference betwwen hashmap and hashtable ?..

Answer / sekhar

Both class are under map interface.But hash table is
synchronized.hashMap is not.we can explictly synchronize
hash map by using the method
Collections.synchronizedMap(Hash Map);

Is This Answer Correct ?    1 Yes 1 No

what is difference betwwen hashmap and hashtable ?..

Answer / kvn

Hash map contains null values,but hash table does not.

Is This Answer Correct ?    1 Yes 3 No

what is difference betwwen hashmap and hashtable ?..

Answer / guest

dfg

Is This Answer Correct ?    2 Yes 6 No

Post New Answer

More Core Java Interview Questions

how to print a numbers from 1 to 100 with out using control structures?

4 Answers   IBM,


What is the purpose of using java.lang.class class?

0 Answers  


Can we inherit the constructor in a Class?please give one example.

9 Answers   iGate,


Is 'sizeof' a keyword?

7 Answers  


What are the major advantages of internal iteration over external iteration?

0 Answers  


Name the methods that used to get and set the text label displayed by a Buttonobject?

1 Answers  


What are exception handling keywords in java?

0 Answers  


What is the range of the short datatype?

2 Answers  


What are the parameters used in Connection pooling?

1 Answers   IBM,


Can a constructor have different name than a class name in java?

0 Answers  


Is it possible for a yielded thread to get chance for its execution again?

0 Answers  


What is the difference between Java1.4 and Java1.5

0 Answers   NIIT,


Categories