‹ Back to the paper
State any one purpose of using the keyword `this` in Java programming.
Answer
Answer
AIThe keyword this refers to the current object. It is used to tell an instance variable apart from a local variable or parameter with the same name, e.g. this.num = num; in a constructor. (It can also be used to call another constructor of the same class or to pass the current object as an argument.)
From ISC 2023 Computer Science Paper 1, question 1(viii).