Why do we call super in constructor?

We use super keyword to call the members of the Superclass . As a subclass inherits all the members (fields, methods, nested classes) from its parent and since Constructors are NOT members (They don’t belong to objects. They are responsible for creating objects), they are NOT inherited by subclasses.8 May 2012

Sizin İçin Seçtik  What is a flutter valve for bronchiectasis?

Leave a Reply

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

Why do we call super in constructor?

We use super keyword to call the members of the Superclass . As a subclass inherits all the members (fields, methods, nested classes) from its parent and since Constructors are NOT members (They don’t belong to objects. They are responsible for creating objects), they are NOT inherited by subclasses.8 May 2012

Sizin İçin Seçtik  What happens if we don't use constructor for a class?

Leave a Reply

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