Microsoft
98-361 · Question #57
How many parameters can a default constructor have?
The correct answer is A. 0. If a class contains no instance constructor declarations, a default instance constructor is automatically provided. That default constructor simply invokes the parameterless constructor of the direct base class.
Understanding Object-Oriented Programming
Question
How many parameters can a default constructor have?
Options
- A0
- B1
- C2
- D3 or more
How the community answered
(40 responses)- A78% (31)
- B3% (1)
- C8% (3)
- D13% (5)
Explanation
If a class contains no instance constructor declarations, a default instance constructor is automatically provided. That default constructor simply invokes the parameterless constructor of the direct base class.
Topics
#default constructor#constructor parameters#object instantiation
Community Discussion
No community discussion yet for this question.