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  What is the purpose of constructor in Java programming?

Leave a Reply

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