Immutability
An object whose state cannot be modified after it is created.
Strings and other concrete objects are typically expressed as immutable objects for:
- improve readability
- runtime efficiency
- inherently thread-safe
- higher security
An object whose state cannot be modified after it is created.
Strings and other concrete objects are typically expressed as immutable objects for: