Multiple choice technology web technology

Which is true below

  1. Hashtable can have null value

  2. HashMap can have null value

  3. Hashtable is unsynchronized

  4. HashMap is synchronized

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

HashMap allows null keys and null values, whereas Hashtable does not permit either. Hashtable is synchronized (thread-safe) while HashMap is unsynchronized, making HashMap faster for non-concurrent use. The key distinction is HashMap's null support and Hashtable's legacy synchronized design.