I didn't use super() in my subclass constructer(Dog) to call the superclass constructor(Animal) but why did the compiler show the output as "Animal constructor". I just want to know why run Animal constructer without using super() keyword
class Animal{
Animal(){
System.out.println("Animal constructor");
}
}
class Dog extends Animal{
Dog(){
System.out.println("dog constructor");
}
}
public class Main{
public static void main(String[] args) {
Dog d = new Dog();
}
}