https://blog.csdn.net/suifengyongyuan/article/details/124356203
默认缓存了 [-128 ~ 127]
Integer m = new Integer(1);
Integer n = new Integer(1);
m==n //false 因为new时 生成不同引用地址
Integer m = 1; Integer n = 1; m==n //true 默认缓存了 [-128 ~ 127] Integer m = 128; Integer n = 128; m==n //false
原创文章,作者:ItWorker,如若转载,请注明出处:https://blog.ytso.com/280076.html