int i = 123;
Integer a = new Integer(i);
int b = i;
Integer c = new Integer(i);
System.out.println(a == b);
System.out.println(b == c);
System.out.println(a == c);
对象hash值比较
int i = 123;
Integer a = new Integer(i);
int b = i;
Integer c = new Integer(i);
System.out.println(a == b);
System.out.println(b == c);
System.out.println(a == c);
对象hash值比较