Integer i5 = 127;
Integer i6 = 127;
System.out.println(i5 == i6);
System.out.println(i5.equals(i6));
System.out.println("-----------");
Integer i7 = 128;
Integer i8 = 128;
System.out.println(i7 == i8);
System.out.println(i7.equals(i8));
如题,请分析i5和i6 \ i7和i8 是否相等,为什么?
|
|