1.int是基本数据类型,Integer是int基本数据类型的包装类数据库
2.Integer是一个类,是int的扩展,定义了不少转换方法,Integer.valueof(String s)将字符串转换为Integer类型,spa
Integer.parseInt(String s)将字符串转换为int类型数据对象
3.int对象的缺省值为0,Integer类型对象的缺省值是null.例如咱们在往数据库存放一我的的工资时,若是工资定义为int类型,那么这我的工资被扣到0元和没有发,是区分不开的,而Integer类型,若是没有发放工资,咱们存放的就是null.字符串