Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Help Java K Keyword - this

Related Tutorials


 
 

Share on Google+Share on Google+

Keyword - this

Advertisement
A keyword is a word having a particular meaning to the programming language.

Keyword - this

     

A keyword is a word having a particular meaning to the programming language. Similarly, this keyword is used to represent an object constructed from a class in which it appears. The this keyword is also used to forward a call from one constructor in a class to another constructor in the same class. It helps to access class members and it provides access to the current instance.  Within an instance method or a constructor, this is a reference to the current object.

As we know with in a program  we declare the name of instance variables and local variables same. Now to avoid the confliction between them we use this keyword. The keyword helps us to avoid name conflicts

To know more about this, just click.

http:/www.roseindia.net/java/beginners/useofthisoperator.shtml

Advertisements

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: November 13, 2009

Related Tutorials

Discuss: Keyword - this   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0
DMCA.com