public class Percent {
public Percent(){
System.out.println("percent 构造方法");
}
{
System.out.println("percent 构造代码块");
}
static{
System.out.println("percent 静态代码块");
}
}
public class Child extends Percent {
public Child(){
System.out.println("child 构造方法");
}
{
System.out.println("child 构造代码块");
}
static{
System.out.println("child 静态代码块");
}
}
public static void main(String[] args) {
Child child=new Child();
}
父类类加载 ---> 子类类加载 -----> 父类实例化 ------> 子类实例化