@
wohenyingyu02 我对这块也才了解...刚刚去做了 11 个题目 错了三 - -
Integer a = 1;
Integer b = 1;
Integer c = 2;
Integer d = 3;
Integer e = new Integer(3);
Integer e1 = new Integer(3);
Long f = 3L;
Long f1 = new Long(3);
int a1 = 1;
int c1 = 2;
System.out.println("1== Integer(1) ?: " + (new Integer(1) == 1));
System.out.println("a==a1 ?:" + (a==a1));
System.out.println("a==b ?:" + (a==b));
System.out.println("d==e ?:" + (d==e));
System.out.println("e1==e ?:" + (e1==e));
System.out.println("a + c == d ?:" + (a + c == d));
System.out.println("a + c == e ?:" + (a + c == e));
System.out.println("a + c == f ?:" + (a + c == f));
System.out.println("a1 + c1== f ?:" + (a1 + c1 == f));
System.out.println("a1 + c1== f1 ?:" + (a1 + c1 == f1));
System.out.println("a + c equals f ?:" + f.equals(a+c));