装箱与拆箱 概述 数据类型 包 装 类 字节长度 默 认 值 int Integer 4 0 short Short 2 0 long Long 8 0l或0L byte Byte 1 0 float Float 4 0.0F或0.0f double Double 8 0.0 char Character 2 u0000 boolean Boolean 1 false 概述 自动装箱:实际上是对基本数据类型的一种封装,即意味着有对象的创建,将基本数据类型转为包装器类型. 自动拆箱:将包装器类型转为其对应的基本数据类…