Do inherited classes need constructors?

In inheritance, the derived class inherits all the members(fields, methods) of the base class, but derived class cannot inherit the constructor of the base class because constructors are not the members of the class .

Sizin İçin Seçtik  What is meant by default constructor in Java?

Leave a Reply

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