2016-09-26_003251.png (244.05 KB, 下载次数: 27)
2016-09-26_003651.png (314.4 KB, 下载次数: 18)
帅哥军 发表于 2016-9-26 00:38
刚刚截图发错了,你自己试试,好好想想!
hydome 发表于 2016-9-26 00:04
其实这是包装对象的特性: 自动装箱
Integer i = 1 等同于 Integer i = Integer.valueOf(1)
nicezt 发表于 2016-9-26 22:46
我好像明白点了,Integer i = new Integer(1);创建时有两个步骤,一个是为i在栈内存中分配空间,为Integ ...
&天马星空ぁ 发表于 2016-9-27 10:50
Integer i=200; 就相当于Integer i=Integer.valueOf(200); 调用了一个自动封箱功能 而这个valueOf()方 ...
欢迎光临 黑马程序员技术交流社区 (http://bbs.itheima.com/) | 黑马程序员IT技术论坛 X3.2 |