Skip to content
Sharp

Object-oriented programming · interview question

Which of the following is a benefit of using immutable objects?

Multiple choiceMediumchapter-3-curatedpremiumoopcontrolled-mutation
Choose one answer
Answer and explanation

Correct answer

B. They are inherently thread-safe

Why

Immutable objects cannot be changed after creation, making them inherently thread-safe because they do not require synchronization when shared between threads.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →