Intermediate Object-Oriented Programming Concepts
Q63 / 100

Why are immutable objects (objects whose state cannot change after creation) often preferred in certain designs?

Correct! Well done.

Incorrect.

The correct answer is B) They are inherently thread-safe and easier to reason about since their state never changes unexpectedly

B

Correct Answer

They are inherently thread-safe and easier to reason about since their state never changes unexpectedly

Explanation

Because immutable objects can't be modified after construction, they avoid issues from shared mutable state, especially in concurrent code.

Progress
63/100