The correct answer is Initialize the object.
- The constructor is a method of class or structure used in object-oriented programming that initializes a newly created object.
Key Points
- Whenever the object is created, the constructor is called automatically.
- A constructor is used to set the values for the variables.
- There are three types of constructors: default constructor, parameterized constructor, and copy constructor.
- The name of the constructor should be the same as the class name and it never returns any value so it has no return type.
- Default constructor accepts no parameter, the parameterized constructor accepts arguments and copy constructor accepts a reference of its own class as a parameter.
