Java replace() 方法 replace() 方法通过用 newChar 字符替换字符串中出现的所有 oldChar 字符,并返回替换后的新字符串。 public String replace(char oldChar, char newChar) oldChar – 原字符 newChar – 新字符