What is a no parameter constructor in Java?

Similar to methods, a Java constructor may or may not have any parameters (arguments). If a constructor does not accept any parameters , it is known as a no-argument constructor. For example, private Constructor() { // body of the constructor }

Sizin İçin Seçtik  Is it OK to call function from constructor?

Leave a Reply

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