- package daysreplace;
-
- public class ReplaceTest {
-
- public static void main(String[] args) {
- String str = "wwxhhhhhhhhhhh333";
-
- System.out.println("替换前的字符串" + str);
-
- String newstr = str.replace("333", "111");
-
- System.out.println("替换后的字符串" + newstr);
-
- }
-
- }