What is the use of subclass constructor?

Subclass Constructors. This constructor explicitly initializes the cx and cy fields newly defined by PlaneCircle , but it relies on the superclass Circle() constructor to initialize the inherited fields of the class. To invoke the superclass constructor, our constructor calls super(). super is a reserved word in Java.

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 *