this keyword in Java
‘this’ is a reference variable that refers to the current object. Following are the ways to use ‘this’ keyword in java: * Using ‘this’ keyword to refer current class instance variables. * Using this() to invoke current class constructor. * Using ‘this’ keyword to return the current class instance. * Using ‘this’ keyword as method parameter. * Using ‘this’ keyword to invoke current class method. * Using ‘this’ keyword as an argument in the constructor call.