Integerは箱を詰めて箱を分解しておよびガラスのボールのテーマを投げます
709 ワード
詳細
Integerの箱詰めと取り外しはおかしいので、Integerは使わないほうがいい=!
i 3を印刷!=i4
Integerの箱詰めと取り外しはおかしいので、Integerは使わないほうがいい=!
package interview;
public class IntegerTest {
public static void main(String[] args) {
// -128--127
Integer i1 = 100;
Integer i2 = 100;
if (i1 == i2) {
System.out.println("i1 == i2");
} else {
System.out.println("i1 != i2 ");
}
// 127
Integer i3 = 200;
Integer i4 = 200;
if (i3 == i4) {
System.out.println("i3 == i4");
} else {
System.out.println("i3 != i4 ");
}
}
}
i 3を印刷!=i4