In java, this is a reference variable that refers to the current object. this keyword can be used to refer current class instance variable. this() can be used to invoke current class constructor. this keyword can be used to invoke current class method (implicitly) this can be passed as an argument in the method call. this can be passed as argument in the constructor call. this keyword can also be used to return the current class instance. Without this: Using this: //example of this keyword
Can you answer this question?
Write Answer1 Answers