Integer对象的一些误解
看代码:
public void testInteger()
{
Integer a = 1;
Integer b = 1;
Integer c = 128;
Integer d = 128;
System.out.println(a == b);
System.out.println(c == d);
}
结果是什么?
看代码:
public void testInteger()
{
Integer a = 1;
Integer b = 1;
Integer c = 128;
Integer d = 128;
System.out.println(a == b);
System.out.println(c == d);
}
结果是什么?