自动装箱
java执行Integer i = 100;编译器编译成Integer i = Integer.valueOf(100);
1 Integer i = 100; 2 //编译器编译成Integer i = Integer.valueOf(100);
自动拆箱
java执行
1 Integer i = 100; 2 int j = i; 3 //编译器编译成int j = i.intValue();
参考:
http://www.cnblogs.com/danne823/archive/2011/04/22/2025332.html
时间: 2024-10-27 23:38:51