Asked by Steven Walsh on May 05, 2024

verifed

Verified

In using the keyword this in place of super) ,the invocation of this must be the ___________ action taken by the constructor.

A) first
B) last
C) it does not matter
D) none of the above

Super Keyword

A reference variable used in Java to refer to the immediate parent class of the current class.

This Keyword

A reference variable in object-oriented programming that refers to the current object.

  • Understand the syntax and purpose of the keywords this and super in inheritance.
verifed

Verified Answer

RS
Ruben SwartzMay 11, 2024
Final Answer :
A
Explanation :
The keyword this must be the first action taken by the constructor as it is used to invoke another constructor within the same class. If it is not used as the first statement, then there is a chance that some instance variables may not have been initialized yet.