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

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

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

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

相关文章:

  • 2022-12-23
  • 2021-07-30
  • 2022-12-23
  • 2021-05-02
  • 2022-12-23
  • 2021-11-22
  • 2021-11-08
猜你喜欢
  • 2022-12-23
  • 2021-12-28
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2021-09-19
  • 2021-07-30
相关资源
相似解决方案