What is this keyword in java?

Category: JavaWhat is this keyword in java?
Editor">Editor Staff asked 2 years ago

What is this keyword in java?

1 Answers
Editor">Editor Staff answered 2 years ago

The this keyword is a reference variable that refers to the current object. There are the various uses of this keyword in Java. It can be used to refer to current class properties such as
instance methods, variable, constructors, etc. It can also be passed as an argument into the methods or constructors. It can also be returned from the method as the current class instance.
java this keyword