While it's perfectly understood that a & b are reference variables and not objects themselves, and a and b may be made to point to some objects such as "abc" etc. including null. Here the code snippet has some object methods such as a.toUppercase(), b.replace("B", "2") and replace('C', '3') - the last 2 are chained, that return the results "ABC", "A2C", and "A23" respectively. As I understand, these 3 returned String objects don't change or replace the original Strings (maintaining their immutable status) and generating 3 new objects in the String pool. Along with returning the new results (and generating the new objects), the results' references are saved in the variable b (but not in a), as obvious in the code b=a.toUppercase() etc. Hence the explanation that b is changing and a not changing.
I hope my understanding is correct?