1、一个类只包含私有的构造方法,不能被继承
编译器提示:Implicit super constructor Father() is not visible for default constructor. Must define an explicit constructor.
public class Father {
private Father() {
}
}
public class Child extends Father {
}
编译器提示:Implicit super constructor Father() is not visible for default constructor. Must define an explicit constructor.