ERROR:The type Employee must implement the inherited abstract method Person.getDescription()
这个错误是因为你的子类继承的是抽象的父类,但是你的子类并不是定义的抽象的类,所以你要对父类中的抽象的方法进行重新定义,重新定义为非抽象的方法
例如:
abstract class Person{
public abstract String getDescription();
}
class Employee extends Person {
public String getDescription() {
return String.format("an employee with a salary of %.2f", salary);
}
}