java中为没一种基本类型都提供相应的包装类型。

byte,short,char,int,long,float,double和boolean

Byte,Short,Character,Integer,Long,Float,Double,Boolean。

自动装箱就是Java自动将原始类型值转换成对应的对象,比如将int的变量转换成Integer对象,这个过程叫做装箱,反之将Integer对象转换成int类型值,这个过程叫做拆箱。

posted on 2019-03-26 15:09  一中晴哥威武  阅读(689)  评论(0编辑  收藏  举报