Java中super的使用
Student(String name,int age,String school){super(name,age);this.school=school;}
?
使用时,super应放在第一句。
3.使用super的注意事项
在使用super时,super指的是调用“对象”本身,而不是指父类中看见的属性和方法。由于他指的是对象,所以不能在static的环境中使用,包括类变量(static field)和类方法(static method),static语句块。