Skip to content

Java Learnings

Himanshu Kesarvani edited this page Nov 17, 2018 · 1 revision

Java Interview Questions

What are the 6 ways to use this keyword in Java?

* this can be used to get the current object.
* this can be used to invoke current object's method.
* this() can be used to invoke current class constructor.
* this can be passed as a parameter to a method call.
* this can be passed as a parameter to a constructor.
* this can be used to return the current object from the method.
Clone this wiki locally