String比较全解析

  == equals 解释
a b  true   true  
a c false  true   
a e  true  true   
a g true  true   
f g false  true   

String a = "hello2";
String b = "hello2";
String c = new String("hello2");
final String d = "hello";
final String e = "hello2";

String f = "hello";
String g = d + 2;
String h = f + 2;

  

原文地址:https://www.cnblogs.com/R4mble/p/9505844.html