String s2 = new String();//在堆中创建空白字符串。
String s1 = "abc";//直接赋值
键盘录入得出的字符串是"new"出来的,在堆中创建
//字符串比较标签:String,s2,s1,boolean,字符串,new,比较 From: https://www.cnblogs.com/louwangshayu/p/17556632.html
//boolean equals方法(要比较的字符串) 完全一样才是true
//boolean equalslgnoreCase(要比较的字符串) 忽略大小写
String s1 = "abc";
String s2 = new String("Abc");
boolean result1 = s1.equals(s2);
boolean result2 = s1.equalsIgnoreCase(s2);
System.out.println(result1);//false
System.out.println(result2);//true