Tag Why string is immutable in Java with Example

Immutable String in Java with Example

Why string is immutable in Java

String class in Java is immutable. The meaning of immutable is unchangeable or unmodifiable. That is, once we create a string object with value, we are not allowed to perform any changes in that object. In other words, we cannot…