What are constructor in subclass explain with example?

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  What are two attributes in Java?

Leave a Reply

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