class Demo0808 {
public static void main(String[]args) {
Zi z = new Zi(1);
//z.test();
}
}
class Fu {
int a;
static {
System.out.println("静态代码块Fu");
}
{
System.out.println("构造代码块Fu");
}
public Fu() {
System.out.println("构造方法Fu2");
}
public Fu(int a) {
this.a = a;
System.out.println("构造方法Fu3");
}
}
class Zi extends Fu {
static {
System.out.println("静态代码块Zi");
}
{
System.out.println("构造代码块Zi!!!");
}
public Zi() {
System.out.println("构造方法Zi");
}
public Zi(int a) {
super(a);
System.out.println("ererere");
}
}
|
|