What is constructor?
Basically, constructor is the special type of function in class which can automatically called at the time of object creation.
constructor is the function which will called when we create any new object.
-Class name and constructor name should be same.
-There is no return type of constructor like void,int etc.
Type of constructor:
-Default constructor are those function in which we cannot pass any argument.
-This constructor are those in which we can pass an argument.
-This is the constructor when we copy one object to another.