高等继续教育 / Java程序设计
题型描述: 编程题
编写 Manager类对Employee类方法的重写
class Employee {
String name ;
int salary;
public Employee(String name,int salary){
this.name = name;
this.salary = salary;
}
public String getDetails( ){
return "Name: "+name+"\nSalary: "+salary;
}
}
编写 Manager类对Employee类方法的重写
class Employee {
String name ;
int salary;
public Employee(String name,int salary){
this.name = name;
this.salary = salary;
}
public String getDetails( ){
return "Name: "+name+"\nSalary: "+salary;
}
}
参考答案:
佳题速递: