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 the difference between strategy and decorator pattern?

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  KTÜ Çan kalktı mı?

Leave a Reply

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