Skip to content
Sharp

Object-oriented programming · interview question

Why does making a class immutable in Java help in practice?

Multiple choiceMediumchapter-3-curatedpremiumoopobject-responsibility
Choose one answer
Answer and explanation

Correct answer

A. Thread-safety

Why

An immutable object is inherently thread-safe because its state cannot change after construction. This makes it easier to share across threads without synchronization.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →