What are the differences between a HashMap and a Hashtable in Java?
Which is more efficient for non-threaded applications?
My small contribution :
First and most significant different between
HashtableandHashMapis that,HashMapis not thread-safe whileHashtableis a thread-safe collection.Second important difference between
HashtableandHashMapis performance, sinceHashMapis not synchronized it perform better thanHashtable.Third difference on
HashtablevsHashMapis thatHashtableis obsolete class and you should be usingConcurrentHashMapin place ofHashtablein Java.