this in java
this is a keyword in Java.It can be used inside the method or constructor of Class.Within an instance method or a constructor, this is a reference to the current object — the object whose method or constructor is being called. You can refer to any member of the current object from within an instance method or a constructor by using this . Here are the points where the keyword this can be used in Java : Within the method of current class. Within the constructor of current class. To refer current class instance variable. Passed as arguments to call constructor. Passed as arguments to call method. To invoke the method of current class. To invoke the constructor of current class. Example : 1. Without this // one cl...