Sometimes the method needs
to access the object.
In such cases, the method can use
The value of
this is the object
that precedes the dot operator during execution.
In the example given above,
admin object precedes
the dot operator during the execution
Therefore, the value of
this will be
We can also access the object using the
instead of using
But this approach is unreliable
as it may access the wrong object
in large programs.