举个Java中:a等于b,b等于c,但a不等于c的例子。
虽然之前了解过包装类,但是碰到这种问法的还是第一次,一时间脑短路了,m
答案如下:
int b = 128; Integer a = 128; Integer c = 128; System.out.println(a == b & b == c); // true System.out.println(a == c); // false
大家还想的出这种例子吗
int b = 128; Integer a = 128; Integer c = 128; System.out.println(a == b & b == c); // true System.out.println(a == c); // false
相关推荐