代码执行后,打印结果正确的是
public class Child extends Father{
static String str;
static {
System.out.println("Child Static block Run!");
}
public Child(String str) {
super(str);
System.out.println("Child Create! " + str);
}
public static void main(String[] args) {
Father father = new Father("123");
Child child = new Child("abc");
}
}
class Father{
static String str;
static {
System.out.println("Father Static block Run!");
}
public Father(String str) {
this.str = str;
}
}
