Skip to content
Sharp

Object-oriented programming · interview question

Which of the following is a feature of immutable objects?

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

Correct answer

A. Their state cannot be changed after creation.

Why

Immutable objects have their state set during construction and do not change thereafter. This ensures thread safety and reliability, as the object's state remains constant.

Test yourself on Object-oriented programming

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

Start free test
All Object-oriented programming questions →