Integer aa = 200;
Integer bb = 200;
System.out.println(aa==bb); //False
System.out.println(aa.equals(bb)); //True
System.out.println("====================");
Integer aaa = -128;
Integer bbb = -128;
System.out.println(aaa==bbb);//True
System.out.println(aaa.equals(bbb));//True
大家知道在华丽的等号分割线上面和下面的结果为什么不一样嘛? |
|