Skip to content
CodeKruPro

HashMap vs Hashtable vs ConcurrentHashMap

QuizMediumJava onlyAsked in: Accenture, Capgemini, TCS

Which statements are true? Pick all that apply.

  • HashMap allows one null key and any number of null values
  • Hashtable allows a null key
  • ConcurrentHashMap is thread-safe and rejects null keys and null values
  • Hashtable is the modern choice for thread-safe maps

This question is part of Pro+

Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.

See Pro+

Already have Pro+? Sign in