Question
What is the purpose of making an object immutable?
Answer
Since they cannot change state, they cannot be corrupted by thread interference or observed in an inconsistent state.
What is the purpose of making an object immutable?
Since they cannot change state, they cannot be corrupted by thread interference or observed in an inconsistent state.