标签:eal ring AC ace int code string replace temp
String temp = "a\nbc";
String temp1;
String temp2;
temp1 = temp.replace("\n","\\n");
temp2 = temp.replaceAll("\n","\\n");
System.out.println(temp);
System.out.println(temp1);
System.out.println(temp2);
标签:eal ring AC ace int code string replace temp
原文地址:https://www.cnblogs.com/chonghaojie/p/8794585.html