Java MCQ: What is not the use of the “this” keyword in Java?
a) Referring to the current class instance variable
b) Invoking the current class constructor
c) Invoking the current class method
d) Passing itself to the method
Answer:
c) Invoking the current class method
Explanation:
The this
keyword in Java is used to refer to the current class instance variable, to invoke the current class constructor, and to pass itself to a method or constructor. It is not used directly to invoke the current class method.
Reference links:
https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html