没有听懂
public class Test05 {public static void main(String[] args) {A a = new A();System.out.println(A.m);/*1. 加载到内存,会产生一个类对应Class对象2. 链接, 链接结束后 m = 03. 初始化<clinit>(){System.out.println("A类静态代码块初始化");m = 300;m = 100;}m = 100;*/}}class A{static {System.out.println("A类静态代码块初始化");m = 300;}/*m = 300m = 100*/static int m = 100;public A(){System.out.println("A类的无参构造初始化");}
}
https://www.bilibili.com/video/BV1p4411P7V3?p=9