Replacing Characters in a String // Replace all occurrences of 'a' with 'o' String newString = string.replace('a', 'o');