package com.sf.day09;

public class Test03 {

    private String name;

    {
        name = "lisi";
        System.out.println("实例代码块执行了。。。");
    }

    public Test03() {
        System.out.println("无参构造器开始执行。。。");
    }

    public Test03(String name) {
        this.name = name;
        System.out.println("有参构造器开始执行。。。");
    }

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

    public static void main(String[] args) {
        Test03 test03 = new Test03();
        System.out.println(test03);
        Test03 wangwu = new Test03("wangwu");
        System.out.println(wangwu);
    }
}
