What is a constructor what are its special properties in Java?

Constructors are special member functions whose task is to initialize the objects of its class . It is treated as a special member function because its name is the same as the class name. Java constructors are invoked when their objects are created.

Leave a Reply

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

What is a constructor what are its special properties in Java?

Constructors are special member functions whose task is to initialize the objects of its class . It is treated as a special member function because its name is the same as the class name. Java constructors are invoked when their objects are created.

Leave a Reply

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