请问是哪个地方出问题了,一直是这个错误,应该怎么修改
class Employee{
private String name;
private int salary;
public Employee(String name,int salary){
this.name=name;
this.salary=salary;
}
public String getDtetails(){
return"Name:"+name+"\nSalary:"+salary;
}
}
//定义Employee的子类Manager
class Manager extends Employee{
private String department;
public Manager(String name,int salary,String department){
super(name,salary);//调用父类Employee的构造方法
this.department=department;
}
public String getDetails(){
//调用父类的成员方法
return super.getDetails()+"\nDepartment:"+department;
}
}
public class TestSuper{
public static void main(String[]args){
Manager m=new Manager("Tom",2000,"Finance");
System.out.println(m.getDetails());
}
}