What are the differences between a HashMap and a Hashtable in Java?
What are the differences between a HashMap and a Hashtable in Java? Which is more efficient for non-threaded applications? java collections hashmap hashtable Share Improve this question Follow edited Aug 1, 2020 at 11:19 Steve Chambers 34.8k 20 20 gold badges 148 148 silver badges 195 195 bronze badges asked Sep 2, 2008 at 20:12 dmanxiii 50.3k 10 10 gold badges 32 32 silver badges 23 23 bronze badges 38 HashTable is obsolete in Java 1.7 and it is recommended to use ConcurrentMap implementation – MissFiona Apr 9, 2017 at 22:10 9 @MissFiona No, ConcurrentMap is not necessary here, as the Question says “non-threaded applications” meaning threading/concurrency is not an issue. – Basil Bourque Dec 29, 2019 at 1:11 4 @BasilBourque, Yes, but I believe what MissFiona meant by that was something akin to " HashTable has traditionally been only chosen because of its partial threading protectio...