Why do we use default constructor in Java?

Q) What is the purpose of a default constructor? The default constructor is used to provide the default values to the object like 0, null, etc. , depending on the type.

Sizin İçin Seçtik  Does a class need a method Java?

Leave a Reply

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