What happens if you don’t call super constructor Java?

Note: If a constructor does not explicitly invoke a superclass constructor, the Java compiler automatically inserts a call to the no-argument constructor of the superclass . If the super class does not have a no-argument constructor, you will get a compile-time error.

Sizin İçin Seçtik  How can we convert one class object to another class in Java?

Leave a Reply

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