Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
yes, it is inherited automatically you can override it (but it runs both A and B constructor) or overload too class A { A() { System.out.println("constructor A"); } } class B extends A {} class Constructor_Test { public static void main(String[] args){ B b = new B(); } } // output: constructor A
6th Jun 2019, 8:28 PM
zemiak