package com.sf.day08.thisandsuper;

public class Person {
    private String name ="凤姐";
    private int age = 20;

    public Person() {
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
        System.out.println("父类无参");
    }

    public Person(String name , int age){
        this.name = name ;
        this.age = age ;

        System.out.println("=======================");
        System.out.println("=======================");
        System.out.println("=======================");
        System.out.println("=======================");
        System.out.println("=======================");
        System.out.println("=======================");
        System.out.println("=======================");
    }

    public String getName() {
        return name;
    }

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

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

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


    public static void main(String[] args) {
        Person person = new Person("zhanghsan",12);
        System.out.println(person);
    }
}
