Sunday, May 25, 2014

this keyword in Java

this keyword

Here is given the usage of this keyword.


  • this keyword can be used to refer current class instance variable.
  • this() can be used to invoke current class constructor.
  • this keyword can be used to invoke current class method (implicitly)
  • this can be passed as an argument in the method call.
  • this can be passed as argument in the constructor call.
  • this keyword can also be used to return the current class instance.

    From - www.DreamsCoder.com
  • 3 comments:

    1. Great post! I recently started a new blog aimed at helping people improve their learning activity in mobile technology, and will try utilize some of your tips. I hadn’t thought about a couple approaches that you suggested here.
      Authorized ipad service center in Chennai | ipad service center in chennai | Authorized ipad service center in Chennai | ipad service center in chennai | ipad service center in chennai | 100% genuine apple parts

      ReplyDelete