All the Mehods in HashTable are synchronized whereas HashMap is not thread-safe.Another big difference is that HashMap allows null key and null values whereas HashTable does not permit null key and null values.Submitted by Bikramjit Bardhan (Bikramjit.Bardhan@ps.net)_____________1--HashMap is a New Java Class , where as HashTable is Old. 2?HashMap is not Synchronized where as hashTable is. 3?HashMap allows null as both key and value, where as HashTable does?nt allow null. 4?HashMap retrieval is not in order (random). HashTable provide ordered retrieval.Submitted by Sameer Shukla (Sameer.Shukla@orange.co.in)
Hash table is thread safe, hash map is not
Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.
Copyright ©2003-2010 CoolInterview.com, All Rights Reserved. Privacy Policy | Terms and Conditions Page URL: http://www.coolinterview.com/interview/823/default.asp?cachecommand=bypass