Ans:

Constructor is a special method of a class which get called automatically when an object of a class is created. Constructors are specially used to initialize data members. If we create any class without constructor, the compiler will automatically create one default constructor for that class. There is always at least one constructor in every class.

comments

You may also like