AlgoMaster Logo

Hashtable

Low Priority15 min readUpdated June 6, 2026

Hashtable is one of the original collection classes in Java, around since version 1.0, long before the Collections Framework was added in Java 1.2. It's a synchronized map: every method is guarded by a lock, so two threads can't be inside the same Hashtable at the same time. It still works, still shows up in old code, and shows up in interviews as the "what's the difference between this and HashMap?" question. This lesson covers what Hashtable is, how its synchronization actually works, why every method being synchronized turns out to be a problem, and what to use instead.

Premium Content

Subscribe to unlock full access to this content and more premium articles.