package com.sf.day08;

public class Father {

    private String name;

    public Father() {
        System.out.println("我是父类无参构造器");
    }

    public Father(String name) {
        this.name = name;
        System.out.println("我是父类的有参构造器");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String toString() {
        return "Father{" +
                "name='" + name + '\'' +
                '}';
    }
}
