I know that \'this\' is acting as reference in Java. We can use it inside the class members only.
What I am asking is... because it is used in the members of the cl
How exactly was [this] defined in Java?
In Java this
is defined by the Java Language Specification as a keyword and therefore is not an ordinary variable name and has special behaviour.
The behaviour of this
is defined in section 15.8.3 of the specification. For example:
When used as a primary expression, the keyword this denotes a value, that is a reference to the object for which the instance method was invoked (§15.12), or to the object being constructed.