Integer i = 100;
i+=10;
视频上讲的时候是不报错的,为什么我运行就报错类型不匹配:不能从 int 转换为 Integer
------解决思路----------------------
我用1.8运行是不报错的。
package test;
class Main {
public static void main(String[] args) {
Integer i = 100;
i += 10;
}
}
package test;
class Main {
public static void main(String[] args) {
Integer i = 100;
i += 10;
}
}