I have a sentence that is passed in as a string and I am doing a replace on the word "and" and I want to replace it with " ". And it's not replacing the word "and" with white space. Below is an example of my logic. And when I debug this the logic does fall into the sentence.replace.
String sentence = "Define, Measure, Analyze, Design and Verify"
if (sentence.contains("and")){
sentence.replace("and", " ");
}
Is there something I am missing here.