代码如下
String abc = "abcd";
abc.replaceAll("a","g");
System.out.println(abc);
为什么打印出来还是abcd?莫名了,我记得以前用这个功能是没问题的。