It is called constructor because it constructs the values of date members of the class . A constructor can never return any value. Hence, it is written with no return type (even void is not written). e.g. A constructor is declared and defined as follows. //class with constructor.