What if superclass has no constructor?

If the parent has no constructor (Object does have one), the compiler will reject the program . But then, Object is a (direct or indirect) superclass of every class in Java. Suppose, we have a class A , which does not extend any class explicitly, so it implicitly extends Object .

Sizin İçin Seçtik  How do I call a super constructor in C++?

Leave a Reply

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