<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: The &#8216;final&#8217; keyword in Java</title>
	<atom:link href="http://www.techtamasha.com/the-final-keyword-in-java/36/feed" rel="self" type="application/rss+xml" />
	<link>http://www.techtamasha.com/the-final-keyword-in-java/36</link>
	<description>a new play everyday</description>
	<lastBuildDate>Thu, 02 Feb 2012 07:16:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
	<item>
		<title>By: gitanjalli</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-11678</link>
		<dc:creator>gitanjalli</dc:creator>
		<pubDate>Sat, 21 Jan 2012 06:05:27 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-11678</guid>
		<description>what do u mean by final keyword?
what is the use of vector class?
plz clearify it</description>
		<content:encoded><![CDATA[<p>what do u mean by final keyword?<br />
what is the use of vector class?<br />
plz clearify it</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jan-Hendrik van Heusden</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-10375</link>
		<dc:creator>Jan-Hendrik van Heusden</dc:creator>
		<pubDate>Mon, 10 Oct 2011 08:52:26 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-10375</guid>
		<description>This explanation is clear and correct, yet I miss a really important point, which me be very naughty to beginners.
That&#039;s the use of final for variables (either local or instance variables) that point to Objects.

// Declare final
final MyClass myFinalClassVar = new MyClass();
// other
MyClass myOtherClassVar = new MyClass();

// Can not assign an other value...
myFinalClassVar = myOtherClassVar; // illegal

// But I *can* change properties of the underlying object:
myFinalClassVar.changeSomethingOfIt(newValue);
// OK, so the variable can not reassigned, but the underlying objects&#039;s property are still mutable!</description>
		<content:encoded><![CDATA[<p>This explanation is clear and correct, yet I miss a really important point, which me be very naughty to beginners.<br />
That&#8217;s the use of final for variables (either local or instance variables) that point to Objects.</p>
<p>// Declare final<br />
final MyClass myFinalClassVar = new MyClass();<br />
// other<br />
MyClass myOtherClassVar = new MyClass();</p>
<p>// Can not assign an other value&#8230;<br />
myFinalClassVar = myOtherClassVar; // illegal</p>
<p>// But I *can* change properties of the underlying object:<br />
myFinalClassVar.changeSomethingOfIt(newValue);<br />
// OK, so the variable can not reassigned, but the underlying objects&#8217;s property are still mutable!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sumant</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-8959</link>
		<dc:creator>Sumant</dc:creator>
		<pubDate>Wed, 06 Jul 2011 07:14:04 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-8959</guid>
		<description>Thanks for posting this valueable article.</description>
		<content:encoded><![CDATA[<p>Thanks for posting this valueable article.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nischal Shetty</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-6037</link>
		<dc:creator>Nischal Shetty</dc:creator>
		<pubDate>Wed, 29 Sep 2010 06:14:21 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-6037</guid>
		<description>@pravin In simple words, when you create 2 strings with same value , 

String s = &quot;Hi&quot;;
String t - &quot;Hi&quot;;

Internally its just a single &quot;Hi&quot; that is present. Now if Strings were not immutable, then if you did a 

s.concat(&quot;Bye&quot;);

This would change the value for variable &quot;t&quot; as well. Hope you got the point.

It is for the very same reason why a simple (s==t) would return true in the case of String but not for other objects.</description>
		<content:encoded><![CDATA[<p>@pravin In simple words, when you create 2 strings with same value , </p>
<p>String s = &#8220;Hi&#8221;;<br />
String t &#8211; &#8220;Hi&#8221;;</p>
<p>Internally its just a single &#8220;Hi&#8221; that is present. Now if Strings were not immutable, then if you did a </p>
<p>s.concat(&#8220;Bye&#8221;);</p>
<p>This would change the value for variable &#8220;t&#8221; as well. Hope you got the point.</p>
<p>It is for the very same reason why a simple (s==t) would return true in the case of String but not for other objects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: pravin</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-6036</link>
		<dc:creator>pravin</dc:creator>
		<pubDate>Wed, 29 Sep 2010 06:05:19 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-6036</guid>
		<description>string objects are immutable o.k .what is the reason to make a string object as immutable?
plz clarify my doubt.</description>
		<content:encoded><![CDATA[<p>string objects are immutable o.k .what is the reason to make a string object as immutable?<br />
plz clarify my doubt.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nischal Shetty</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-839</link>
		<dc:creator>Nischal Shetty</dc:creator>
		<pubDate>Wed, 18 Feb 2009 15:35:29 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-839</guid>
		<description>@lakshmi

Yeah, very true :) Thanks for pointing that out. My article holds good for instance variables that are final. 

Class variables which are final are the ones that can be only initialized inside the constructor.</description>
		<content:encoded><![CDATA[<p>@lakshmi</p>
<p>Yeah, very true <img src='http://www.techtamasha.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Thanks for pointing that out. My article holds good for instance variables that are final. </p>
<p>Class variables which are final are the ones that can be only initialized inside the constructor.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lakshmi</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-836</link>
		<dc:creator>lakshmi</dc:creator>
		<pubDate>Wed, 18 Feb 2009 06:26:26 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-836</guid>
		<description>Variable which is marked final and not initialized can be initialized only once in constructor, not anywhere else.
If the final variable is static, then it can be initialized only once in static initialization blocks.</description>
		<content:encoded><![CDATA[<p>Variable which is marked final and not initialized can be initialized only once in constructor, not anywhere else.<br />
If the final variable is static, then it can be initialized only once in static initialization blocks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: techtamasha.com &#187; Blog Archive &#187; Difference between String and StringBuffer/StringBuilder in Java</title>
		<link>http://www.techtamasha.com/the-final-keyword-in-java/36/comment-page-1#comment-105</link>
		<dc:creator>techtamasha.com &#187; Blog Archive &#187; Difference between String and StringBuffer/StringBuilder in Java</dc:creator>
		<pubDate>Tue, 24 Jun 2008 11:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://techtamasha.com/?p=36#comment-105</guid>
		<description>[...] Link: Have doubts about the &#8216;final&#8217; keyword? check out my post - Click Here! [...]</description>
		<content:encoded><![CDATA[<p>[...] Link: Have doubts about the &#8216;final&#8217; keyword? check out my post &#8211; Click Here! [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>

