一道面试题关于Integer的缓存范围(-128~127)所引起的一系列问题记录
某天无意中看见一道关于Integer的笔试题,问下面的输出结果是多少:
package test;
public class Test {
public static void main(String[] args) {
Integer i1 = 127;
Integer i2 = 127;
System.err.println(i1 == i2);
...
转载
2019-04-08 10:41:10 ·
535 阅读 ·
0 评论