<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Complete Java Tutorial &#187; Keyword</title>
	<atom:link href="http://completejavatutorial.com/category/keyword/feed/" rel="self" type="application/rss+xml" />
	<link>http://completejavatutorial.com</link>
	<description>Learn Java, Java Interview Questions, Java tutorial for beginners</description>
	<lastBuildDate>Thu, 04 Jun 2009 06:48:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Use of Abstract Keyword in Java like Abstract Class</title>
		<link>http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/</link>
		<comments>http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 06:48:34 +0000</pubDate>
		<dc:creator>gedet basumatary</dc:creator>
				<category><![CDATA[Core Java]]></category>
		<category><![CDATA[Keyword]]></category>
		<category><![CDATA[Write a Program Code]]></category>
		<category><![CDATA[abstract]]></category>
		<category><![CDATA[abstract class]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[compiler error]]></category>
		<category><![CDATA[complete java tutorial]]></category>
		<category><![CDATA[instantiate]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://completejavatutorial.com/?p=61</guid>
		<description><![CDATA[Hi friends, today we will discuss another important keyword of Java called Abstract keyword. Note down this important points of the Abstract keyword

Abstract class acts as a base class for other classes of same type.
Abstract class can&#8217;t be instantiated.
There can be any abstract class without any abstract method but vice versa is not possible.
If we [...]]]></description>
			<content:encoded><![CDATA[<p>Hi friends, today we will discuss another important keyword of Java called Abstract keyword. Note down this important points of the Abstract keyword</p>
<ol>
<li>Abstract class acts as a base class for other classes of same type.</li>
<li>Abstract class can&#8217;t be instantiated.</li>
<li>There can be any abstract class without any abstract method but vice versa is not possible.</li>
<li>If we are extending a class from an abstract class then we have to provide definition of all the abstract method in the first concrete class (concrete class means not abstract class).</li>
<li>Abstract class can have constructors.</li>
<li>Abstract class can have main method also.</li>
</ol>
<p>Let&#8217;s do some practical on Abstract keyword. It will clear our doubts. After all learning through practical implementations will make our concept stronger.</p>
<p>Program 1</p>
<blockquote><p>class abs1<br />
{<br />
void disp();<br />
}</p></blockquote>
<p>Output</p>
<p>This program will give a compile time error because it is a simple class program where we need to give definition to function of the class. Here we didn&#8217;t define the function of the class. Hence we get compile time error.</p>
<p>Program 2</p>
<blockquote><p>class abs2<br />
{<br />
abstract void disp();<br />
}</p></blockquote>
<p>Output</p>
<p>Compile time error.</p>
<p>Reason :- abs 2 should be declared abstract. As I said before, if we declare any method inside the class as abstract then we have to declare the same class as abstract otherwise it will give a compile time error.</p>
<p>Program 3</p>
<blockquote><p>abstract class abs3<br />
{<br />
abstract void disp();<br />
}</p></blockquote>
<p>Output</p>
<p>It will compile successfully.</p>
<p>Reason: &#8211; Since we have declared both method and class as abstract so there won&#8217;t be a problem.</p>
<p>Program 4</p>
<blockquote><p>abstract class abs4<br />
{<br />
static void show()<br />
{<br />
System.out.println(&#8220;Hello&#8221;);<br />
}<br />
public static void main(String[] args)<br />
{<br />
show();<br />
}<br />
}</p></blockquote>
<p>Output</p>
<blockquote><p>Hello</p></blockquote>
<p>Reason: &#8211; It will print the Hello statement. Here we have used a static keyword with the function, so we didn&#8217;t create instance of class. Now check out the program 5, it will make you things more clear.</p>
<p>Program 5</p>
<blockquote><p>abstract class abs5<br />
{<br />
void show()<br />
{<br />
System.out.println(&#8220;Hello&#8221;);<br />
}<br />
public static void main(String[] args)<br />
{<br />
new abs5.show();<br />
}<br />
}</p></blockquote>
<p>Output</p>
<blockquote><p>Compile time error.</p></blockquote>
<p>Reason: &#8211; We tried to instantiate and its clearly written in the above statement of abstract that Abstract class can&#8217;t be instantiated. This program 5 is almost same to program 4. Here we just removed the static keyword. Since the method or function is not static now, so we will need to instantiate to call the method but we are not allowed to instantiate in abstract class. So we get compiler time error.</p>
<p>Program 6</p>
<blockquote><p>abstract class abs7<br />
{<br />
abstract void disp();<br />
}</p>
<p>class check extends abs7<br />
{<br />
public static void main(String[] ar)<br />
{<br />
new check().disp();<br />
}<br />
}</p></blockquote>
<p>Output</p>
<blockquote><p>Compile time error.</p></blockquote>
<p>Reason: &#8211; Here we have created two class check and abs7. abs7 is the base class and abstract class. We are inheriting the abstract class here but we are not defining the abstract method in the derived class. Since we didn&#8217;t define the abstract class in the in the derive class it caused a compiler error. If you read the above statement of abstract class its clear written that &#8220;<em>If we are extending a class from an abstract class then we have to provide definition of all the abstract method in the first concrete class (concrete class means not abstract class).</em>&#8221;</p>
<p>Note: &#8211; I will update this post more later.</p>
<input id="gwProxy" type="hidden" />
<p><!--Session data--><br />
<input id="gwProxy" type="hidden"/><!--Session data--><br />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<strong>Share this Post</strong><small><a alt="" href="http://www.picturesurf.org/share-buttons/">[?]</a></small><div id="sharepost" style="padding-top:10px;" ><a href="mailto:?subject=Use of Abstract Keyword in Java like Abstract Class&amp;body=http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/" target="_blank"><img src="http://www.picturesurf.org/img/shreml.png" alt="" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/share.php?u=http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/" target="_blank"><img src="http://www.picturesurf.org/img/shrfb.png" alt="" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/ target="_blank"><img src="http://www.picturesurf.org/img/shrtwr.png" alt="" /></a>&nbsp;&nbsp;<a href="http://digg.com/submit?url=http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/&amp;title=Use of Abstract Keyword in Java like Abstract Class&amp;bodytext=&amp;media=&amp;topic=" target="_blank"><img src="http://www.picturesurf.org/img/shrdig.png" alt="" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/&amp;title=Use of Abstract Keyword in Java like Abstract Class" target="_blank"><img src="http://www.picturesurf.org/img/shrdel.png" alt="" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://completejavatutorial.com/use-of-abstract-keyword-in-java-like-abstract-class/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Use of Super Keyword in Java</title>
		<link>http://completejavatutorial.com/use-of-super-keyword-in-java/</link>
		<comments>http://completejavatutorial.com/use-of-super-keyword-in-java/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 05:12:36 +0000</pubDate>
		<dc:creator>gedet basumatary</dc:creator>
				<category><![CDATA[Core Java]]></category>
		<category><![CDATA[Keyword]]></category>
		<category><![CDATA[Write a Program Code]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[complete java tutorial]]></category>
		<category><![CDATA[derived class]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[parent class]]></category>
		<category><![CDATA[super]]></category>

		<guid isPermaLink="false">http://completejavatutorial.com/?p=57</guid>
		<description><![CDATA[Ok today we will try to discuss the super keyword of Java. What is the super keyword in Java?, What is the use of super Keyword in Java?, How to practically implement super keyword in Java?, we will discuss all this things. So first note down these important points regarding super keyword in Java.

Super keyword [...]]]></description>
			<content:encoded><![CDATA[<p>Ok today we will try to discuss the <strong>super</strong> keyword of Java. What is the<strong> super</strong> keyword in Java?, What is the use of <strong>super</strong> Keyword in Java?, How to practically implement <strong>super</strong> keyword in Java?, we will discuss all this things. So first note down these important points regarding <strong>super</strong> keyword in Java.</p>
<ol>
<li><strong>Super</strong> keyword is used to call immediate parent.</li>
<li><strong>Super</strong> keyword can be used with instance members i.e., instance variables and instance methods.</li>
<li><strong>Super</strong> keyword can be used within constructor to call the constructor of parent class.</li>
</ol>
<p>OK now let&#8217;s practically implement this points of <strong>super</strong> keyword.</p>
<p>Check out the difference between program 1 and 2. Here program 2 proofs our first  statement of <strong>Super</strong> keyword in Java.</p>
<p>Program 1</p>
<blockquote><p>class base<br />
{<br />
int a = 100;<br />
}</p>
<p>class sup1 extends base<br />
{<br />
int a = 200;<br />
void show()<br />
{<br />
System.out.println(a);<br />
System.out.println(a);<br />
}<br />
public static void main(String[] args)<br />
{<br />
new sup1().show();<br />
}<br />
}</p></blockquote>
<p>Output : -</p>
<blockquote><p>200</p>
<p>200</p></blockquote>
<p>Now check out the program 2 and try to figure out the main difference.</p>
<p>Program 2</p>
<blockquote><p>class base<br />
{<br />
int a = 100;<br />
}</p>
<p>class sup2 extends base<br />
{<br />
int a = 200;<br />
void show()<br />
{<br />
System.out.println(super.a);<br />
System.out.println(a);<br />
}<br />
public static void main(String[] args)<br />
{<br />
new sup2().show();<br />
}<br />
}</p></blockquote>
<p>Output</p>
<blockquote><p>100</p>
<p>200</p></blockquote>
<p>In the program 1, the output was only of the derived class. It couldn&#8217;t print the variable of base class or parent class. But in the program 2, we used a super keyword with the variable a while printing its output and instead of printing the value of variable a of derived, it printed the value of variable a of base class. So it proofs that <strong>Super</strong> keyword is used to call immediate parent.</p>
<p>OK now check out the difference between program 3 and program 4</p>
<p>Program 3</p>
<blockquote><p>class base<br />
{<br />
int a = 100;<br />
void show()<br />
{<br />
System.out.println(a);<br />
}<br />
}</p>
<p>class sup3 extends base<br />
{<br />
int a = 200;<br />
void show()<br />
{<br />
System.out.println(a);<br />
}<br />
public static void main(String[] args)<br />
{<br />
new sup3().show();<br />
}<br />
}</p></blockquote>
<p>Output</p>
<blockquote><p>200</p></blockquote>
<p>Here the output is 200. When we called the show function, the show function of derived class was called. But what should we do if we want to call the show function of the parent class. Check out the program 4 for solution.</p>
<p>Program 4</p>
<blockquote><p>class base<br />
{<br />
int a = 100;<br />
void show()<br />
{<br />
System.out.println(a);<br />
}<br />
}</p>
<p>class sup4 extends base<br />
{<br />
int a = 200;<br />
void show()<br />
{<br />
super.show();<br />
System.out.println(a);<br />
}<br />
public static void main(String[] args)<br />
{<br />
new sup4().show();<br />
}<br />
}</p></blockquote>
<p>Output</p>
<blockquote><p>100</p>
<p>200</p></blockquote>
<p>Here we are getting two output 100 and 200. When the show function of derived class is invoke, it first calls the show function of parent class because inside the show function of derived class we called the show function of parent class by putting the <strong>super</strong> keyword before the function name.</p>
<p>Ok here&#8217;s a program for you. You need to predict the output of this program</p>
<blockquote><p>class base<br />
{<br />
int a=100;<br />
void show()<br />
{<br />
System.out.println(a);<br />
}<br />
}</p>
<p>class sup5 extends base<br />
{<br />
int a=200;<br />
void show()<br />
{<br />
System.out.println(a);<br />
super.show();<br />
}<br />
public static void main(String[] args)<br />
{<br />
new sup5().show();<br />
}<br />
}</p></blockquote>
<p>So tell us, what will be the output? So now I think you too know what is <strong>super</strong> keyword in Java? How and where the <strong>super</strong> keyword is used in Java? So friends, if you find or face any difficulty in learning this <strong>super</strong> keyword of Java then let me know.</p>
<input id="gwProxy" type="hidden" />
<p><!--Session data--></p>
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<input id="gwProxy" type="hidden" />
<p><!--Session data--></p>
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<input id="gwProxy" type="hidden"/><!--Session data--><br />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<strong>Share this Post</strong><small><a alt="" href="http://www.picturesurf.org/share-buttons/">[?]</a></small><div id="sharepost" style="padding-top:10px;" ><a href="mailto:?subject=Use of Super Keyword in Java&amp;body=http://completejavatutorial.com/use-of-super-keyword-in-java/" target="_blank"><img src="http://www.picturesurf.org/img/shreml.png" alt="" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/share.php?u=http://completejavatutorial.com/use-of-super-keyword-in-java/" target="_blank"><img src="http://www.picturesurf.org/img/shrfb.png" alt="" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=http://completejavatutorial.com/use-of-super-keyword-in-java/ target="_blank"><img src="http://www.picturesurf.org/img/shrtwr.png" alt="" /></a>&nbsp;&nbsp;<a href="http://digg.com/submit?url=http://completejavatutorial.com/use-of-super-keyword-in-java/&amp;title=Use of Super Keyword in Java&amp;bodytext=&amp;media=&amp;topic=" target="_blank"><img src="http://www.picturesurf.org/img/shrdig.png" alt="" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http://completejavatutorial.com/use-of-super-keyword-in-java/&amp;title=Use of Super Keyword in Java" target="_blank"><img src="http://www.picturesurf.org/img/shrdel.png" alt="" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://completejavatutorial.com/use-of-super-keyword-in-java/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>FINAL keyword in Java Language</title>
		<link>http://completejavatutorial.com/final-keyword-in-java-language/</link>
		<comments>http://completejavatutorial.com/final-keyword-in-java-language/#comments</comments>
		<pubDate>Sat, 23 May 2009 07:06:52 +0000</pubDate>
		<dc:creator>gedet basumatary</dc:creator>
				<category><![CDATA[Core Java]]></category>
		<category><![CDATA[Keyword]]></category>
		<category><![CDATA[final]]></category>
		<category><![CDATA[final kewword in java]]></category>

		<guid isPermaLink="false">http://completejavatutorial.com/?p=45</guid>
		<description><![CDATA[Last time we discussed about the this keyword. Today we will discussed about another keyword called final. So note down the important points of the final keyword: -

Final is a keyword which can be used with variables, methods and classes.
If we declare any variable as final, it will be constant.
If we declare any method as [...]]]></description>
			<content:encoded><![CDATA[<p>Last time we discussed about the this keyword. Today we will discussed about another keyword called <strong>final</strong>. So note down the important points of the <strong>final</strong> keyword: -</p>
<ol>
<li>Final is a keyword which can be used with variables, methods and classes.</li>
<li>If we declare any variable as final, it will be constant.</li>
<li>If we declare any method as final, it cannot be overridden.</li>
<li>If we declare any class as final, it can&#8217;t be inheritance.</li>
<li>Final is the only modifier which can be used with local variables.</li>
<li>Delay initialization of final variable are possible only within constructor.</li>
<li>Final variables will never get default variables.</li>
</ol>
<input id="gwProxy" type="hidden" />
<p><!--Session data--></p>
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<input id="gwProxy" type="hidden"/><!--Session data--><br />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<strong>Share this Post</strong><small><a alt="" href="http://www.picturesurf.org/share-buttons/">[?]</a></small><div id="sharepost" style="padding-top:10px;" ><a href="mailto:?subject=FINAL keyword in Java Language&amp;body=http://completejavatutorial.com/final-keyword-in-java-language/" target="_blank"><img src="http://www.picturesurf.org/img/shreml.png" alt="" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/share.php?u=http://completejavatutorial.com/final-keyword-in-java-language/" target="_blank"><img src="http://www.picturesurf.org/img/shrfb.png" alt="" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=http://completejavatutorial.com/final-keyword-in-java-language/ target="_blank"><img src="http://www.picturesurf.org/img/shrtwr.png" alt="" /></a>&nbsp;&nbsp;<a href="http://digg.com/submit?url=http://completejavatutorial.com/final-keyword-in-java-language/&amp;title=FINAL keyword in Java Language&amp;bodytext=&amp;media=&amp;topic=" target="_blank"><img src="http://www.picturesurf.org/img/shrdig.png" alt="" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http://completejavatutorial.com/final-keyword-in-java-language/&amp;title=FINAL keyword in Java Language" target="_blank"><img src="http://www.picturesurf.org/img/shrdel.png" alt="" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://completejavatutorial.com/final-keyword-in-java-language/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Write a Program about THIS keyword in Java</title>
		<link>http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/</link>
		<comments>http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/#comments</comments>
		<pubDate>Thu, 21 May 2009 20:46:25 +0000</pubDate>
		<dc:creator>gedet basumatary</dc:creator>
				<category><![CDATA[Keyword]]></category>
		<category><![CDATA[Write a Program Code]]></category>

		<guid isPermaLink="false">http://completejavatutorial.com/?p=33</guid>
		<description><![CDATA[I have discussed earlier about the this keyword with you. Now we will do a programming to how to use this keyword practically. It will surely clear your doubts and make your concept about this keyword more strong.
There will be a series of this program around 4 programs. You will need to read all the [...]]]></description>
			<content:encoded><![CDATA[<p>I have discussed earlier about the <a title="this, this keyword in java, what is this keyword" href="http://completejavatutorial.com/this-keyword-in-java-language/" target="_blank">this</a> keyword with you. Now we will do a programming to how to use <strong>this</strong> keyword practically. It will surely clear your doubts and make your concept about this keyword more strong.</p>
<p>There will be a series of <strong>this</strong> program around 4 programs. You will need to read all the 4 <strong>this</strong> program to understand the concept.</p>
<p>Program 1: &#8211; (In this program, I didn&#8217;t use <strong>this</strong> keyword)</p>
<blockquote><p>class th1<br />
{<br />
int a,b;<br />
th1(int a, int b)<br />
{<br />
a=a;<br />
b=b;<br />
}<br />
public void show()<br />
{<br />
System.out.println(a);<br />
System.out.println(b);<br />
}<br />
public static void main(String[] ar)<br />
{<br />
new th1(10, 20).show();<br />
}<br />
}</p></blockquote>
<p>Create a particular folder on the drive like <strong>myjava</strong> and save this file as <strong>&#8220;th1.java&#8221;</strong></p>
<p>Now open command prompt to compile and run the program. You can also click run and type cmd. It will open a command prompt.</p>
<p>If you are going to compile the java program for the first time then you will need to set the path of the java for whenever you open the command prompt. Its very easy process. When you installed the jdk software of any version probably in c drive then it gets a path like it is installed under program files in the c drive. Click the program files and click the java and then click the jdk software and then click the bin. Now in the address bar, check out the path and copy it and paste in the command prompt like I did</p>
<p><strong>c:\java&gt;set path=<img src="file:///C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/moz-screenshot-1.jpg" alt="" />C:\j2sdk1.4.0\bin</strong></p>
<p>Also check out the screen shot</p>
<p><img class="aligncenter" title="Set the path in java, how to set path in java" src="http://completejavatutorial.com/wp-content/setthejavapath.JPG" alt="" width="387" height="219" /></p>
<p>After that compile the program by writing this code</p>
<p><img src="file:///C:/DOCUME%7E1/ADMINI%7E1/LOCALS%7E1/Temp/moz-screenshot.jpg" alt="" /><strong>javac th1.java</strong></p>
<p>If there is no error then run the program by writing the code</p>
<p><strong>java th1</strong></p>
<p>When you compile and run this program, you will get a output of</p>
<p><strong>0</strong></p>
<p><strong>0</strong></p>
<p>as shown in screen shot</p>
<p><img class="aligncenter" title="Compile and run the java program" src="http://completejavatutorial.com/wp-content/compileandrunthejavaprogram.JPG" alt="" width="403" height="304" /></p>
<p>Hows the result is 0,0</p>
<p>Here in this program, we have two variables as data members int a and int b. Another is the constructor paramertised variable int a and int b.</p>
<p>In the main method, we passed the value 10 and 20 (  <strong>new th1(10, 20).show();</strong>) to the respective varible of the constuctor paramter int a and int b.</p>
<p>Now in this statement: -</p>
<p><strong>a=a;<br />
b=b;</strong></p>
<p>the value of constructor int a is replaced by the data member int a.</p>
<p>the value of constructor int b is replaced by the data member int b.</p>
<p>So when the program is run, the output is shown as the defaut value of data members.</p>
<input id="gwProxy" type="hidden" />
<p><!--Session data--></p>
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<input id="gwProxy" type="hidden"/><!--Session data--><br />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<strong>Share this Post</strong><small><a alt="" href="http://www.picturesurf.org/share-buttons/">[?]</a></small><div id="sharepost" style="padding-top:10px;" ><a href="mailto:?subject=Write a Program about THIS keyword in Java&amp;body=http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/" target="_blank"><img src="http://www.picturesurf.org/img/shreml.png" alt="" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/share.php?u=http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/" target="_blank"><img src="http://www.picturesurf.org/img/shrfb.png" alt="" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/ target="_blank"><img src="http://www.picturesurf.org/img/shrtwr.png" alt="" /></a>&nbsp;&nbsp;<a href="http://digg.com/submit?url=http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/&amp;title=Write a Program about THIS keyword in Java&amp;bodytext=&amp;media=&amp;topic=" target="_blank"><img src="http://www.picturesurf.org/img/shrdig.png" alt="" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/&amp;title=Write a Program about THIS keyword in Java" target="_blank"><img src="http://www.picturesurf.org/img/shrdel.png" alt="" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://completejavatutorial.com/write-a-program-about-this-keyword-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>THIS keyword in Java Language</title>
		<link>http://completejavatutorial.com/this-keyword-in-java-language/</link>
		<comments>http://completejavatutorial.com/this-keyword-in-java-language/#comments</comments>
		<pubDate>Thu, 21 May 2009 13:06:13 +0000</pubDate>
		<dc:creator>gedet basumatary</dc:creator>
				<category><![CDATA[Keyword]]></category>
		<category><![CDATA[java language]]></category>
		<category><![CDATA[this]]></category>

		<guid isPermaLink="false">http://completejavatutorial.com/?p=26</guid>
		<description><![CDATA[Today we will talk about this keyword in Java Language. I will write some important points of the this keyword and will try to implement few points practically too. Before moving further you should know the meaning of the keyword. In every programming language including java, Keyword is defined as: -
Keyword is a reserved words [...]]]></description>
			<content:encoded><![CDATA[<p>Today we will talk about <strong>this</strong> keyword in Java Language. I will write some important points of the <strong>this</strong> keyword and will try to implement few points practically too. Before moving further you should know the meaning of the keyword. In every programming language including java, Keyword is defined as: -</p>
<p>Keyword is a reserved words which has a special meaning. There are 50 keywords and 3 literals in the java language.</p>
<p>Ok back to the point, the important points of the <strong>this</strong> keywords are: -</p>
<ol>
<li><strong>this</strong> always refers to current object.</li>
<li><strong>this</strong> keyword can be used to resolve ambiguity between local variables and data members.</li>
<li><strong>this</strong> keyword cannot be called within static context.</li>
<li><strong>this</strong> keyword can be used to called the constructor of the same class.</li>
</ol>
<input id="gwProxy" type="hidden" />
<p><!--Session data--></p>
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<input id="gwProxy" type="hidden"/><!--Session data--><br />
<input id="jsProxy" onclick="jsCall();" type="hidden" />
<strong>Share this Post</strong><small><a alt="" href="http://www.picturesurf.org/share-buttons/">[?]</a></small><div id="sharepost" style="padding-top:10px;" ><a href="mailto:?subject=THIS keyword in Java Language&amp;body=http://completejavatutorial.com/this-keyword-in-java-language/" target="_blank"><img src="http://www.picturesurf.org/img/shreml.png" alt="" /></a>&nbsp;&nbsp;<a href="http://www.facebook.com/share.php?u=http://completejavatutorial.com/this-keyword-in-java-language/" target="_blank"><img src="http://www.picturesurf.org/img/shrfb.png" alt="" /></a>&nbsp;&nbsp;<a href="http://twitter.com/home?status=http://completejavatutorial.com/this-keyword-in-java-language/ target="_blank"><img src="http://www.picturesurf.org/img/shrtwr.png" alt="" /></a>&nbsp;&nbsp;<a href="http://digg.com/submit?url=http://completejavatutorial.com/this-keyword-in-java-language/&amp;title=THIS keyword in Java Language&amp;bodytext=&amp;media=&amp;topic=" target="_blank"><img src="http://www.picturesurf.org/img/shrdig.png" alt="" /></a>&nbsp;&nbsp;<a href="http://delicious.com/save?v=5&amp;noui&amp;jump=close&amp;url=http://completejavatutorial.com/this-keyword-in-java-language/&amp;title=THIS keyword in Java Language" target="_blank"><img src="http://www.picturesurf.org/img/shrdel.png" alt="" /></a></div>]]></content:encoded>
			<wfw:commentRss>http://completejavatutorial.com/this-keyword-in-java-language/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
