Can we use constructor in subclass?

The constructors of the subclass can initialize only the instance variables of the subclass . Thus, when a subclass object is instantiated the subclass object must also automatically execute one of the constructors of the superclass. To call a superclass constructor the super keyword is used.

Sizin İçin Seçtik  Should super be the first line in constructor?

Leave a Reply

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