This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Can you please explain the syntax Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Can you please explain the syntax" Watch "Can you please explain the syntax" New topic
Author

Can you please explain the syntax

sanjey asok
Ranch Hand

Joined: Jul 11, 2009
Posts: 39
Can you please explain the syntax

What this code explain



Abhishk Gupta
Greenhorn

Joined: Oct 08, 2008
Posts: 22
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.



There are only 10 types of people in the world: those who understand ternary, those who don't, and those who mistake it for binary.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Can you please explain the syntax
 
jQuery in Action, 3rd edition