when we initialize the form at that time if we


When we initialize the form at that time if we require to set any variable's value then we can set it by defining in constructor. Constructor's name always similar as class name and destructor is used to recover memory occupied by any variable important in constructor. Constructor and destructor is the new method in object oriented languages to initialize the variables at the time of object creation.

When we declare an object, we can pass the values to it and that values will be assigned to the data members of that class, whose object it is. A class can have no. of objects & no. of constructors. A constructor is called automatically when an object is formed. There is only one destructor in any class, that is to deallocated the memory of the object when an object is cracked or no longer exist  

 

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: when we initialize the form at that time if we
Reference No:- TGS0413416

Expected delivery within 24 Hours