a) Passing itself to another method
b) Calling another constructor in constructor chaining
c) Referring to the instance variable when local variable has the same name
d) Passing itself to method of the same class
Answer: d
Explanation: “this” is an important keyword in java. It helps to distinguish between local variable and variables passed in the method as parameters.
Related Posts
What would be behaviour if the constructor has a return type?
What would be the behaviour if one parameterized constructor is explicitly defined?
What is true about protected constructor?
Abstract class cannot have a constructor.
What is true about constructor?
What is true about Class.getInstance()?
What is false about constructor?
Join The Discussion