abstract的应用是怎么回事呢?
比如,有个学生类和员工类,都有名字和年龄字段
public class Employee {
private String name;
private Integer age;
private String compony;
public Employee() {
}
public Employee(String name, Integer age, String compony) {
this.name = name;
this.age = age;
this.compony = compony;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public String getCompony() {
return compony;
}
public void setCompony(String compony) {