The replace method and replaceAll method in the String class both replace all matched strings, but the parameters are different. The difference is that the first parameter of replaceAll is a regular expression
To replace a string, use StringBuffer or StringBuilder's replace(int start, int end, String str) to replace the str string at the specified position