Unger Technologies LLC

GREG UNGER MY FACEBOOK ATHLETE PAGE MY YOUTUBE CHANNEL Follow me on Twitter FOLLOW ME ON TWITTER

What is a reason for having strings be immutable?

Strings will never get a race condition because of corruption. Immutable classes are easier to design, implement and use than mutable classes. They are less prone to error and are more secure. An immutable object can be in exactly one state, the state in which it was created.

No comments:

Post a Comment