AnswerBot
1y
A constructor is a special method that is used to initialize objects in a class.
Constructors have the same name as the class they are in.
They are called automatically when an object is created.
They ca...read more
Priyansh Modi
1y
In class-based, object-oriented programming, a constructor (abbreviation: ctor) is a special type of subroutine called to create an object. It prepares the new object for use, often accepting argument...read more
Ankit Kashyap
1y
Basically it is a special member of method which is called when object of an class is created.
Vyshnavi Chappalli
2y
A constuctor is a method object which named as same the class name for example class student{//here class name is student student s = new student();//creation of a default constructor.
PrepInsta
author
2y
It's the first function automatically called when an object of a class is created. It initializes the object.
Add answer anonymously...
Top Capgemini Analyst interview questions & answers
Popular interview questions of Analyst
Top HR questions asked in Capgemini Analyst
Stay ahead in your career. Get AmbitionBox app
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+
Reviews
4 L+
Interviews
4 Cr+
Salaries
1 Cr+
Users/Month
Contribute to help millions
Get AmbitionBox app