How do you create a default constructor to initialize the data members in Java?

Java compiler automatically creates a default constructor (Constructor with no arguments) in case no constructor is present in the java class.

Sizin İçin Seçtik  Does every class have a constructor?

Leave a Reply

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