class c { c(){ System.out.println("Instance intialization"); }
}
class E extends c{ E(int i,int y ){} public static void main(String[] args){ E _e = new E(2,4); } }
//output "Instance intialization" In class E ,there will be no default constructor as i have written two argument constructor then hw is the constructor of class c is called.
Yes, for each constructor you define, the first operation is to call a parent constructor. I you don't explicitly call a parent constructor using super(arguments), there's an implicit call to the parent default constructor.
So your constructor E(int i,int y ){} is equivalent to E(int i,int y ){super();}
Note that if you declare a class F which extends E, for each constructor of F, you'll need to call EXPLCITLY super(int x, int y) since E doesn't have a no-arg constructor.