Java初学者求助 自动装箱和拆箱问题
定义了一个Studnt 类 代码如下:
public class Student {
private Object javase;
private Object oracle;
public Student(Object javase,Object oracle)
{
super();
this.javase=javase;
this.oracle=oracle;
}
}
调用时 public class App {
public static void main(String[] args)
{
Student stu =new Student(80,90);
}
}
Student stu =new Student(80,90);这一句报错,提示是好像构造器问题
我看教学视频中说这样会自动装箱拆箱,int-->integer-->Object
可是为什么会报错,请大神指点,不胜感激