I'm unable to understand why a String doesn't work like an object such that when you change it, the variable it's assigned to also changes.
I've tried making an array of Strings, and then assigned the reference of one element to a variable ( I say reference since from what I understand Java is pass by value and a memory reference is that "value")
When I changed the String element the variable doesn't reflect the change.
String[] arr={"abc","def"};
String s=arr[1];
arr[1]+="123r";
for (String i:arr) {System.out.print(i);}
System.out.println(); // prints "abcdef123r"
System.out.println(s); //prints "def"
Perhaps, from what I've been reading, the assignment operator doesn't work like that for Strings.