package _02_继承._05_继承构造方法;

public class Employee {
    private String name;
    private int age;
    private String sex;

    public Employee(String name, int age, String sex) {
        this.name = name;
        this.age = age;
        this.sex = sex;
    }

    @Override
    public String toString() {
        return "Employee{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }

    public Employee() {
        // 调用的是本类有参数构造器
        this("默认名字",18,"男");
    }
}
