"the war of baronets".replace('r', 'y') returns "the way of bayonets""JonL".replace('q', 'x') returns "JonL" (no change)
public String replace(char oldChar, char newChar) Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
returns "the way of bayonets""JonL".replace('q', 'x')
returns "JonL" (no change)
char newChar)
Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.