This Pointer
This Pointer
• You may invoke the method of the current class by using the
this keyword.
• If you don't use the this keyword, compiler automatically
adds this keyword while invoking the method. Let's see the
example
Example
3) this() : to invoke current class constructor
• The this() constructor call can be used to invoke the current class
constructor.
• It is used to reuse the constructor. In other words, it is used for
constructor chaining.
Real usage of this() constructor call