Do all classes have a no-arg constructor?

All classes have at least one constructor . If a class does not explicitly declare any, the Java compiler automatically provides a no-argument constructor, called the default constructor.

Sizin İçin Seçtik  How many types of methods are there in Java class?

Leave a Reply

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