次のコードがあります。
public static void doIntCompareProcess() {
int a = 100;
int b = 100;
Integer c = 200;
Integer d = 200;
int f = 20000;
int e = 20000;
System.out.println(c == d);
compareInt(e, f);
compareInt(a, b);
}
public static void compareInt(Integer v1, Integer v2) {
System.out.println(v1 == v2);
}
これにより、次の出力が得られます。
false
false
true
現在の出力は次の場所にあります。
false
false
false
コードに対して間違った出力が得られるのはなぜですか?