How does Hashtable handle thread synchronization?
Hashtable is synchronized by default, but it uses individual locks for each key-value pair, so multiple threads can access it at once.
That's incorrect. Hashtable uses a single lock for all operations, which can reduce concurrency.
Can you explain how ConcurrentHashMap differs from Hashtable in terms of thread synchronization?