Can constructor be inherited through a subclass that calls the superclass constructor?

Super class’s Constructor in inheritance In inheritance constructors are not inherited . You need to call them explicitly using the super keyword.

Sizin İçin Seçtik  What is the difference between superclass and subclass in Java?

Leave a Reply

Your email address will not be published. Required fields are marked *