package com.lovecoding.day11.static03;

public class TestStatic01 {
    public static void main(String[] args) {
        //10 第一次被加载
        //System.out.println(A.a);

        A a1 = new A();
        A a2 = new A();

    }
}

class A {
    //静态属性
    static int a;
    //静态
    static  {
        a = 10;
        System.out.println("静态代码块执行，a="+a);
    }
    {
        a = 20;
        System.out.println("代码块执行，a="+a);
    }

    public A() {
        a = 30;
        System.out.println("构造方法执行，a="+a);
    }
}
