this keyword in Java
๐ท this
Keyword in Java
The this
keyword is a reference to the current object — the object whose method or constructor is being called.
✅ Common Uses of this
:
๐ธ 1. Distinguish instance variables from parameters
๐ธ 2. Call another constructor (Constructor Chaining)
๐ธ 3. Return current object
Comments
Post a Comment