2018/7/9 踩坑

版权声明:转载说明出处,谢谢。 https://blog.csdn.net/Black_PL/article/details/80974242

包装类 integer比较

如果要比较Integer的值,比较靠谱的是通过

Integer.intValue();这样出来的就是int值,就可以直接比较了

或者equals()比较。

切勿直接 "==" 就比较!!!!

多么痛的领悟。

猜你喜欢

转载自blog.csdn.net/Black_PL/article/details/80974242