原因是在子类继承父类构造函数的时候,子类构造函数使用void修饰返回值了。
在这里插入代码片
 

 正确的应该去掉void:
package Student;
import myutils.*;
public class Student extends Common {
    public Student() {
    }
    public  Student(String name, int age, int money) {
        super(name, age, money);
    }
    public void getSomeMoney(int money) {
        int hasMoney = super.getMoney();
        super.setMoney(hasMoney + money);
    }
}










