Call subclass constructor from superclass constructor
No, we cannot call subclass constructor from superclass constructor. Example class SuperClass{ SuperClass(){ System.out.println("SuperClass constructor"); SubClass(); } } public class SubClass extends SuperClass { SubClass (){ System.out.println("Subclass constructor"); } public static void main(String[] args) { System.out.println("Constructor test"); } }class SuperClass{ SuperClass(){ System.out.println("SuperClass constructor"); SubClass(); } } public class SubClass extends SuperClass { SubClass (){ System.out.println("Subclass … Read more