Microsoft
98-361 · Question #161
The purpose of a constructor in a class is to:
The correct answer is A. Initialize an object of that class. Each value type has an implicit default constructor that initializes the default value of that type.
Understanding Object-Oriented Programming
Question
The purpose of a constructor in a class is to:
Options
- AInitialize an object of that class.
- BInherit from the base class.
- CRelease the resources that the class holds.
- DCreate a value type.
How the community answered
(27 responses)- A85% (23)
- B4% (1)
- C4% (1)
- D7% (2)
Explanation
Each value type has an implicit default constructor that initializes the default value of that type.
Topics
#constructor#object initialization#class#OOP
Community Discussion
No community discussion yet for this question.