Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can you please explain the syntax

 
sanjey asok
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you please explain the syntax

What this code explain



 
Abhishk Gupta
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sanjey,

Let me put in simple words.
this operator returns the object of current class. Here in this case Farmer.this will return an object of the class Farmer and you are trying to access class member variable age with the help of that object.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic