Skip to content
Sharp

Concurrency basics · interview question

Which package do AtomicInteger and AtomicReference belong to?

Multiple choiceEasychapter-15-curatedpremiumconcurrencyatomic-variables
Choose one answer
Answer and explanation

Correct answer

D. Java.util.concurrent.atomic

Why

AtomicInteger and AtomicReference belong to the java.util.concurrent.atomic package, which provides classes for lock-free thread-safe programming.

Test yourself on Concurrency basics

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

Start free test
All Concurrency basics questions →