Constructor

Constructor is a special member of a class which is used to initialize the state of an object. It provides the values to the data members at the time of object creation that is why it is known as constructor.

Constructor does not have an explicit return type but it returns current instance.