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  Why do we need a no-args constructor?

Leave a Reply

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