GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Placement Papers  >  Oracle  >  Java

 Print  |  
Question:  What is the difference between HashTable and HashMap?




October 10, 2009 01:45:48 #3
 bhushanamca   Member Since: July 2009    Total Comments: 2 

RE: What is the difference between HashTable and HashMap?
 
Hashtable does not allow null values or null keys, whereas hash map allows null keys and null values. Hashtable is synchronzied whareas hashmap is not synchronized. In case of single thread using hashmap is faster than the hashtable. In case of multiple thereads, using hashtable is advisable.
     

 

Back To Question