I'm not sure if I'm using the replaceAll method correctly. Based on the example below, if I'm using Public String replaceAll method, do I need to use " around each string inside the parenthesis? Am I using the method correctly?
exampleString = "Hello, Jenn. How are you, Jenn?";
exampleString = exampleString.replaceAll("Jenn", "Kim");
I want to change the string to substitute Kim for Jenn. I'm confused because my textbook is telling me that string are immutable, or can't be changed. Do I have to assign a new name to my string entirely or will my example above work? If it works, how can a string be immutable but allow me to alter it?