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:
String str="hi";
str=str+" hello";
another option is,
StringBuffer str= new StringBuffer("hi");
str.append("hello");
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?