When you create an instance of a subclass JVM creates instances of all superclasses (including Object
). If you don’t call constructor of parent class yourself JVM will do it for you if parent class has noarg constructor or you will have a compilation error if your parent class doesn’t have noarg constructor and you don’t call any other patent class constructors yourself.
13
solved if there’s no super object created,why can I call the super constructor in java [closed]