Constructor is used to initializing objects of a class and allocate appropriate memory to objects . That is, it is used to initialize the instance variables of a class with a different set of values but it is not necessary to initialize.
Constructor is used to initializing objects of a class and allocate appropriate memory to objects . That is, it is used to initialize the instance variables of a class with a different set of values but it is not necessary to initialize.