两个Integer对象是否 == Leave a Comment / Java / September 23, 2011 September 23, 2011 其机制与String是类似的 Integer a = 5; Integer b = 5; System.out.println(a == b); // true. Integer c = new Integer(5); Integer d = new Integer(5); System.out.println(c == d); // false.