What restriction is there on using the super reference in the constructor?
A. It can only be used in the parent's constructor
B. Only one child class can use it.
C. It must be used in the last statement of the constructor
D. It must be used in the first statement of the constructor
Answers
Answered by
0
Answer:
A: It can only be used in the parent's constructor.
Answered by
0
A. It can only be used in the parent's constructor is the right answer.
Explanation:
- super() may be used most effectively withinside the subclass constructor and have to be the primary assertion.
- Super reference in a constructor can most effectively be used withinside the parent's constructor.
- super() may be used to invoke the instant discern elegance constructor.
The call to super() has to be the primary assertion withinside the Derived(Student) Class constructor.
#SPJ3
Similar questions