[Solved] Is Java String immutable? [duplicate]
Yes, the java string is immutable. In changeString, you are passing in a reference to the string lalala and then you are changing the reference to one that points to lalalaCHANGE!!!. The original string object is not changed, and the reference in main still refers to that original object. If you were to use a … Read more