Do you know what happens when a String is replaced?
Do you know why a String is immutable?
Try to solve this Java Challenger and understand this concept deeply!
Get the code of the Java Challengers and run your own tests: https://javachallengers.com/code