String s1 = "BloodParrot is the man";
String s2 = "BloodParrot is the man";
String s3 = new String("BloodParrot is the man");
System.out.println(s1.equals(s2));
System.out.println(s1 == s2);
System.out.println(s1 == s3);
System.out.println(s1.equals(s3));
// 输出
true
true
false
true
如果所有三个字符串都具有相同的内容,为什么不是所有字符串在内存中都具有相同的位置?