等しい文字列リテラルを持つStringクラスコンストラクターを使用して宣言された2つの文字列オブジェクトは、等価演算子 '=='を使用して比較した場合、同じ文字列リテラルが等しいと指定すると、String Object Equality
String s1 = new String("hello");
String s2 = new String("hello");
Boolean result1 = (s1 == s2);// returns false
String s3 = "hello";
String s4 = "hello";
Boolean result2 = (s3 == s4);// returns true
はn^n回尋ねられました。 –
この回答はその質問に対する最善の説明です... –