As far as I know,
An immutable string cannot be modified, while changeable strings can.
Here, I want to modify the String's value as follows:
another option is,
StringBuffer str= new StringBuffer("hi");
I'm attempting to change the value of str in both situations. Can somebody explain the differences between the two cases and provide a clear illustration of changeable and immutable objects?