How do you identify the constructor?

Every class has a constructor whether it’s a normal class or a abstract class. Constructors are not methods and they don’t have any return type. Constructor name should match with class name . Constructor can use any access specifier, they can be declared as private also.

Sizin İçin Seçtik  Why is class used in C++?

Leave a Reply

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