public class test {
public static void main(String[] args) {
String str1 = new String("あああ");
String str2 = new String("あああ");
String str3 = "あああ";
String str4 = "あああ";

System.out.println( (str1 == str2) ? "同じ" : "違う" );
System.out.println( (str3 == str4) ? "同じ" : "違う" );
}
}

new String だとインスタンスの比較なのか "違う" となるのは分かったのですが、
もう片方は よく分かりません。 なぜ "同じ" となるのか教えて下さい。m(_ _)m