Integer integer1 = 100;
Integer integer2 = 100;
System.out.println(integer1==interger2); //此时输出结果为ture;
Integer integer1 = new Integer(100);
Integer integer2 = new Integer(100);
System.out.println(integer1==interger2); //此时输出结果为false;
原文:https://www.cnblogs.com/Q179060322/p/13831903.html