public class Person{
public Person(String name,char sex,int age){
this.name = name;
this.sex = sex;
this.age = age;
}
public String name;
public char sex;
public int age;
}
public class Employee extends Person{
public Employee (String name,char sex,int age,String department,String positon){
this.name = name;
this.sex = sex;
this.age = age;
this.department = department;
this.positon = positon;
}
public String department;
public String positon;
}
public class Test{
public static void main(String[] args) {
Person person = new Person("张三",'男',18);
Employee employee = new Employee ("张三",'男',18,"产品部","第一排");
}
}