Q: Assertion (A): Constructors are invoked directly when an object is created.
Reason (R): Constructors are not used to initialize the instance of classes.
-
A
Both Assertion (A) and Reason (R) are true, and Reason (R) is the correct explanation of Assertion (A).
-
B
Both Assertion (A) and Reason (R) are true, and Reason (R) is not the correct explanation of Assertion (A).
-
C
Assertion (A) is true, and Reason (R) is false.
-
D
Assertion (A) is false, and Reason (R) is true.
C
Answer:
C
Explanation:
Assertion (A): True. Constructors are invoked automatically when an object is created to initialize the object.
Reason (R): False. Constructors are specifically designed to initialize the instance variables of a class.
Related Topic:
Share Above MCQ