Java int和Integer的区别时间:2021-01-27 17:35:05int是基本类型(Primitive),Integer是引用类型(Warpper)。 int是java的原始数据类型,Integer是java为int提供的封装类。 int的变量不需要实例化,Interger的变量需要实例化。 int的默认值为0,Integer的默认值为null。 int一般做数值参数,Integer一般做类型转换。 程序里简单运算用int,对象里的属性用Integer。