I know that by default, String varaibles are immutable in Java. But is there some way to set a String variable, or some special way (when passing said String variable) to make it mutable?
Or at least temporarily allow that Stirng to be changed?
I realize that I can change the value of a String by just assigning the modified immutable variable to the original variable, like show:
String A = "Test";
A.toUpperCase(); //will make A upper case, but not save the new upper case string to a variable
Sring A = A.toUpperCase; //will give me TEST and save it to A, replacing A
Is there some way to tell Java "Hey, for this one String specifically, treat it as mutable"?