If there is a constructor with all the default arguments and arguments are not passed then _________________

Ngô Thị Vân

New member
If there is a constructor with all the default arguments and arguments are not passed then _________________
A. The default values given will not be used
B. Then all the null values will be used
C. Then all the default values given will be used
D. Then compiler will produce an error
 
Answer: c
Explanation: The constructors will use the default values listed for use. The null values are not used because those are not specified. Though if it was compiler provided default constructor, then it would have initialized the members to null or zero values.
 

Tìm kiếm

Back
Top