包装的分类有哪四类 Java中int和Integer的区别 包装类?

Java中int和Integer的区别 包装类?Java中有两种数据类型:int、char、double、Boolean、float、byte、short、long,其他都是引用数据类型。基本数据类型

Java中int和Integer的区别 包装类?

Java中有两种数据类型:int、char、double、Boolean、float、byte、short、long,其他都是引用数据类型。基本数据类型和对象数据类型可以相互转换。将int转换为integer的过程是打包,将integer转换为int的过程是解包,integer是int的打包类。int to integer int i=0 integer wrapper=new integer(i)integer to int integer wrapper=new integer(10)int i=wrapperi.int值()