can someone please explain me "this" keyword in java in brief
and its use
Answers
Answered by
1
hey here is your answer
Keyword 'THIS' in Java is a reference variable that refers to the current object. "this" is a reference to the current object, whose method is being called upon. You can use "this" keyword to avoid naming conflicts in the method/constructor of your instance/object
and it's uses
It is used with the constructor and used to refer to the current object of the constructor using this keyword. Keyword 'THIS' in Java is a reference variable that refers to the current object. It can be used to refer current class instance variable. It can be used to invoke or initiate current class constructor.
make sure it brainliest please
Keyword 'THIS' in Java is a reference variable that refers to the current object. "this" is a reference to the current object, whose method is being called upon. You can use "this" keyword to avoid naming conflicts in the method/constructor of your instance/object
and it's uses
It is used with the constructor and used to refer to the current object of the constructor using this keyword. Keyword 'THIS' in Java is a reference variable that refers to the current object. It can be used to refer current class instance variable. It can be used to invoke or initiate current class constructor.
make sure it brainliest please
Answered by
1
Keyword 'THIS' in Java is a reference variable that refers to the current object. It can be used to refer current class instance variable. It can be used to invoke or initiate
Similar questions