why are we using the keyword “this”? Can it work without using “this”?
Linked list - addlast
@asthaaggarwal2
The this
keyword refers to the current object in a method or constructor.
this
keyword can also be used to:
- Invoke current class constructor
- Invoke current class method
- Return the current class object
- Pass an argument in the method call
- Pass an argument in the constructor call
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.