What is a constructor?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is a constructor?
Rating:
A constructor is a special type of method. It initializes an object immediately upon creation. It has the same name as the class in which it resides. A constructor is automatically called immediately after an object is created, before the new operator completes. A constructor can be marked as public, protected, or private. It has no explicit return type, not even void.
Rating:
Was this information helpful?
Other articles
- What is the subMap() method of the NavigableMap interface?
- What is code-access security?
- What is constructor overloading?
- What is Regsvcs.exe?
- What is the Comparable interface?