Java Associate — Medium
Key points
- HashMap permits null keys, Hashtable does not
- HashMap is unsynchronized, Hashtable is synchronized
- Synchronization in Hashtable ensures thread safety
- Null keys are a key distinction between the two
- HashMap is preferred for non-thread-safe operations
Ready to go further?
Related questions
