What is a constructor why it is called so?

The constructor is invoked whenever an object of its associated class is created. 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).

Sizin İçin Seçtik  What carrier is US Mobile super LTE?

Leave a Reply

Your email address will not be published. Required fields are marked *