一.String简介d 参考:https://www.cnblogs.com/zhangyinhua/p/7689974.html String类代表字符串. java.lang.String: Java程序中的所有字符串文字(例如"abc" )都被实现为此类的实例. 字符串String的值在创建后不能被更改 String源码 /** String的属性值 */ private final char value[]; /** The offset is the first index…
例1: public class Test { public static void main(String[] args) { String s = "'sds gdasda" + "\n" + "edaeafd'"; System.out.println("转换前:"+s); s = s.replaceAll("\r|\n", ""); System.out.println(&quo…
我们先来看几个例子: 例1: public class Test { public static void main(String[] args) { String s = "'sds gdasda" + "\n" + "edaeafd'"; System.out.println("转换前:"+s); s = s.replaceAll("\r|\n", ""); System.out.…