Immutability of string
Mutable objects are those objects whose contents can be modified. Immutable objects are those objects, once created can not be modified. String class object is immutable that means when we create an object, it never changes in the existing object.
Let us see immutability of string from given program