String Immutability
Immutable strings cannot be changed after they are created. In Java this is a fundamental property of String. In modern .NET, System.String is also immutable. If a modification is requested, a new string is created rather than modifying the original object.
String interning and pooling become safe because shared strings cannot be changed by one consumer.
Immutability makes strings easier to reason about in concurrent programs.
Hash codes can be safely cached because the contents cannot change.
Strings used as map keys remain stable after insertion.
Immutability reduces certain classes of accidental state-sharing bugs.
Repeated concatenation can still be inefficient, so StringBuilder or equivalent builders should be used for many modifications.