Autoboxing似乎归结为我可以写:
Integer i = 0;
代替:
Integer i = new Integer(0);
因此,编译器可以自动将基元转换为Object.
这是个主意吗?为什么这很重要?
java autoboxing
autoboxing ×1
java ×1