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.
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.