Skip to content
Sharp

Concurrency basics · interview question

What could be a scenario where ConcurrentHashMap might not offer significant performance benefits over Collections.synchronizedMap?

Multiple choiceHardchapter-15-curatedpremiumconcurrencyconcurrent-collections
Choose one answer
Answer and explanation

Correct answer

B. When most operations are writes confined to a single thread.

Why

If most operations are writes and confined to a single thread, the benefits of ConcurrentHashMap's lock striping won't be realized, as there's no contention among threads.

Test yourself on Concurrency basics

A free test with instant, explained results. No account needed.

Start free test
All Concurrency basics questions →