概述:子类默认会调用父类的隐士的构造方法,如代码:
public class Person{
}
public class ZhangSan extends Person{
public ZhangSan(){
//此处这句话隐士调用
super();
}
}
//再给你一个例子作为参考
public class Person{
public Person(String name){
System.out.println(name);
}
}
public class ZhangSan extends Person{
public ZhangSan(){
super("张三");
}
}