<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wikidot="http://www.wikidot.com/rss-namespace">

	<channel>
		<title>Raghavan&#039;s WikiSite - new forum posts</title>
		<link>http://raghavan.wikidot.com/forum/start</link>
		<description>Posts in forums of the site &quot;Raghavan&#039;s WikiSite&quot; - Sharing of thoughts...</description>
				<copyright></copyright>
		<lastBuildDate></lastBuildDate>
		
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-37967#post-98461</guid>
				<title>how many strings are created?</title>
				<link>http://raghavan.wikidot.com/forum/t-37967/how-many-strings-are-created#post-98461</link>
				<description></description>
				<pubDate>Mon, 28 Jan 2008 18:31:41 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>Reference javaranch thread -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=042205&amp;p=1">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=042205&amp;p=1</a></p> </div> <p>How many String Objects are created when executing the following code?</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-number">11</span><span class="hl-code">. </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">makinStrings</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-number">12</span><span class="hl-code">. </span><span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">s</span><span class="hl-code"> = </span><span class="hl-quotes">"</span><span class="hl-string">Fred</span><span class="hl-quotes">"</span><span class="hl-code">; </span><span class="hl-comment">// this line creates one object</span><span class="hl-code"> </span><span class="hl-number">13</span><span class="hl-code">. </span><span class="hl-identifier">s</span><span class="hl-code"> = </span><span class="hl-identifier">s</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">47</span><span class="hl-quotes">"</span><span class="hl-code">; </span><span class="hl-comment">// this line creates two objects</span><span class="hl-code"> </span><span class="hl-number">14</span><span class="hl-code">. </span><span class="hl-identifier">s</span><span class="hl-code"> = </span><span class="hl-identifier">s</span><span class="hl-code">.</span><span class="hl-identifier">substring</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-number">2</span><span class="hl-code">, </span><span class="hl-number">5</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">// this line creates one object</span><span class="hl-code"> </span><span class="hl-number">15</span><span class="hl-code">. </span><span class="hl-identifier">s</span><span class="hl-code"> = </span><span class="hl-identifier">s</span><span class="hl-code">.</span><span class="hl-identifier">toUpperCase</span><span class="hl-brackets">(</span><span class="hl-code"> </span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">// this line creates one object</span><span class="hl-code"> </span><span class="hl-number">16</span><span class="hl-code">. </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">s</span><span class="hl-code">.</span><span class="hl-identifier">toString</span><span class="hl-brackets">()</span><span class="hl-code"> ; </span><span class="hl-number">17</span><span class="hl-code">. </span><span class="hl-brackets">}</span> </pre></div> </div> <p>Though many ranchers answered already (a seems to be correct answer is 3), the perfect explanation<br /> given by <strong>Jim Yingst</strong> is here:</p> <p>Unfortunately this isn't a very good test question, and it's not representative of the questions you'll get on the real exam. The problem is that the compile-time constants "Fred" and "47" have special behavior that's more subtle then you need to know for the exam, and it's ambiguous to say that they were "created" in the code. What happens is, String objects for "Fred" and "47" are created when the class is loaded, not when the method is run. And if the method is run more than once, "Fred" and "47" aren't recreated - they just get re-used. So, if you run the method just once and exit, you get:</p> <p>"Fred", "47" created when class is loaded.<br /> "Fred47", "ed47", "ED47" created when the method is run.</p> <p>That's 5 strings total.</p> <p>If you run the method 5 times, you get</p> <p>"Fred", "47" created when class is loaded.<br /> "Fred47", "ed47", "ED47" created when the method is run the 1st time<br /> "Fred47", "ed47", "ED47" created when the method is run the 2nd time<br /> "Fred47", "ed47", "ED47" created when the method is run the 3rd time<br /> "Fred47", "ed47", "ED47" created when the method is run the 4th time<br /> "Fred47", "ed47", "ED47" created when the method is run the 5th time</p> <p>That's 17 strings over 5 method calls.</p> <p>Additionally, in the event that some other code has used the constants "Fred" or "47" before the method is called, those strings won't be recreated at all. So it's possible that the above code could create just 3 objects when run once, and 15 object when run 5 times.</p> <p>Based on all this, you can guarantee that at least three String objects are created when the method is run, and at most, five. I would say that three String objects are created in the method, and two may be caused to be created when the class is loaded.</p> <p>Ultimately I don't think there's any way to determine what the "best" answer is for this question because, the way it's phrased, it's ambiguous. I wouldn't worry too much about it. The real exam won't have a question like this anyway.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-37967/how-many-strings-are-created">how many strings are created?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-37292#post-96789</guid>
				<title>Re: which one will it invoke? base or derived?</title>
				<link>http://raghavan.wikidot.com/forum/t-37292/which-one-will-it-invoke-base-or-derived#post-96789</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 19:06:31 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>[[toc]]</p> <h1><span>Reply from <strong>Fred Rosenberger</strong>, <em>sheriff, author</em>:</span></h1> <p>the object being created is a Derived.</p> <h1><span>Reply from <strong>Bill Shirley</strong>:</span></h1> <p>during the magic of new, the java runtime calls the constructors of the superclass and the subclass.</p> <p><em>You have overriden addValue() in the subclass. All instances of the subclass have this method replaced.</em></p> <p>The only (non-reflective) way to get to it is to invoke super.addValue() from the subclass.</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Base</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-identifier">Base</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-comment">//This method overriden by subclass</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code"> += </span><span class="hl-number">10</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">getValue</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Derived</span><span class="hl-code"> </span><span class="hl-reserved">extends</span><span class="hl-code"> </span><span class="hl-identifier">Base</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">Derived</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-reserved">super</span><span class="hl-code">.</span><span class="hl-identifier">addValue</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-identifier">value</span><span class="hl-code"> += </span><span class="hl-number">20</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Test3</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">){</span><span class="hl-code"> </span><span class="hl-identifier">Base</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Derived</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-comment">// b isa Derived</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-identifier">b</span><span class="hl-code">.</span><span class="hl-identifier">getValue</span><span class="hl-brackets">())</span><span class="hl-code">; </span><span class="hl-comment">// output now 60</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <h1><span>Reply from <strong>Yelamuri Chandu</strong>:</span></h1> <p>You are creating a object of Drevied and assingn it to a variable with ref Base.</p> <p>When you are creating any Object wiht new Keyword what the JVM will do is first it creates all the varaibles and methods belong to its super and then it own. At any point of time if you call any varible or method first it will try to pick from its own area if not available it goes to super area.</p> <p>here also the addvalue is available with Derived one, so it executes the devried class method.</p> <p>In this case if you want to supress and call super class methods then you need to use super keyword which invoke super class method directly.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-27941">SCJP2 Discussion / inheritance</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-37292/which-one-will-it-invoke-base-or-derived">which one will it invoke? base or derived?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-37292#post-96781</guid>
				<title>which one will it invoke? base or derived?</title>
				<link>http://raghavan.wikidot.com/forum/t-37292/which-one-will-it-invoke-base-or-derived#post-96781</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 18:43:58 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>JavaRanch Reference Thread -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=025141&amp;p=1">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=025141&amp;p=1</a></p> </div> <p>Question by <strong>Jose Campana</strong>:<br /> Analyze this case and please tell me Why the method with the comment <strong>//This method</strong> is never reached.</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Base</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code">; </span><span class="hl-identifier">Base</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-comment">//This method</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code"> += </span><span class="hl-number">10</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">getValue</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Derived</span><span class="hl-code"> </span><span class="hl-reserved">extends</span><span class="hl-code"> </span><span class="hl-identifier">Base</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">Derived</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">addValue</span><span class="hl-brackets">(){</span><span class="hl-code"> </span><span class="hl-identifier">value</span><span class="hl-code"> += </span><span class="hl-number">20</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Test3</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">){</span><span class="hl-code"> </span><span class="hl-identifier">Base</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Derived</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-identifier">b</span><span class="hl-code">.</span><span class="hl-identifier">getValue</span><span class="hl-brackets">())</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <p>The preceding code prints out 40. And of course, that means that the method addValue() in class Base() never executes.</p> <p>When inside Base() constructor, it calls the addValue() method, and it uses the one defined in class Derived. but the Question is:</p> <p><strong>WHY ?</strong></p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-27941">SCJP2 Discussion / inheritance</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-37292/which-one-will-it-invoke-base-or-derived">which one will it invoke? base or derived?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-37244#post-96596</guid>
				<title>Re: are constructors really constructing?</title>
				<link>http://raghavan.wikidot.com/forum/t-37244/are-constructors-really-constructing#post-96596</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 13:57:56 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><strong>Raghs</strong>:</p> <p>I have tested this in a small program:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">AreConstructorsModifying</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-comment">/* This is to show that instance variables are assigned their default values. See it in printA()'s output. That's why 'a' is not initalized. */</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code">; </span><span class="hl-types">final</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">finalA</span><span class="hl-code">; </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">Instance Initialization Block 1</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//finalA = 1;</span><span class="hl-code"> </span><span class="hl-identifier">printA</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">printA</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">printA(), a = </span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-reserved">this</span><span class="hl-code">.</span><span class="hl-identifier">a</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-comment">//finalA = 2;</span><span class="hl-code"> </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-comment">/** Creates a new instance of AreConstructorsModifying */</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-identifier">AreConstructorsModifying</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code"> = </span><span class="hl-number">7</span><span class="hl-code">; </span><span class="hl-identifier">finalA</span><span class="hl-code"> = </span><span class="hl-number">9</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">toString</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-quotes">"</span><span class="hl-string">[AreConstructorsModifying] : a = </span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-reserved">this</span><span class="hl-code">.</span><span class="hl-identifier">a</span><span class="hl-code">+</span><span class="hl-quotes">"</span><span class="hl-string">, finalA = </span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-identifier">finalA</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">AreConstructorsModifying</span><span class="hl-code"> </span><span class="hl-identifier">obj</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">AreConstructorsModifying</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">obj is : </span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-identifier">obj</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <p>The output is :</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Instance</span><span class="hl-code"> </span><span class="hl-identifier">Initialization</span><span class="hl-code"> </span><span class="hl-identifier">Block</span><span class="hl-code"> </span><span class="hl-number">1</span><span class="hl-code"> </span><span class="hl-identifier">printA</span><span class="hl-brackets">()</span><span class="hl-code">, </span><span class="hl-identifier">a</span><span class="hl-code"> = </span><span class="hl-number">0</span><span class="hl-code"> </span><span class="hl-identifier">obj</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> : </span><span class="hl-brackets">[</span><span class="hl-identifier">AreConstructorsModifying</span><span class="hl-brackets">]</span><span class="hl-code"> : </span><span class="hl-identifier">a</span><span class="hl-code"> = </span><span class="hl-number">7</span><span class="hl-code">, </span><span class="hl-identifier">finalA</span><span class="hl-code"> = </span><span class="hl-number">9</span> </pre></div> </div> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-27912">SCJP2 Discussion / constructors</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-37244/are-constructors-really-constructing">are constructors really constructing?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-37244#post-96595</guid>
				<title>Re: are constructors really constructing?</title>
				<link>http://raghavan.wikidot.com/forum/t-37244/are-constructors-really-constructing#post-96595</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 13:54:59 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>A Sample program from <strong>Ilja Preuss</strong>, <em>Sheriff and Author</em>:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Foo</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">private</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">foo</span><span class="hl-code"> = </span><span class="hl-number">42</span><span class="hl-code">; </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">this</span><span class="hl-code">.</span><span class="hl-identifier">print</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-identifier">Foo</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">constructor</span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">private</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">print</span><span class="hl-brackets">()</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-identifier">foo</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">Foo</span><span class="hl-brackets">()</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <p>The following is the output when you run the above program</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-number">42</span><span class="hl-code"> </span><span class="hl-identifier">constructor</span> </pre></div> </div> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-27912">SCJP2 Discussion / constructors</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-37244/are-constructors-really-constructing">are constructors really constructing?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-37244#post-96593</guid>
				<title>are constructors really constructing?</title>
				<link>http://raghavan.wikidot.com/forum/t-37244/are-constructors-really-constructing#post-96593</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 13:53:18 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>JavaRanch Ref thread -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=011778">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=011778</a></p> </div> <p>Reply from <strong>Mike Gershman</strong>:</p> <p>In my view, constructors are misnamed - they alter already initialized variables in already created objects, based on the arguments passed to the constructors in the <strong>new</strong> syntax and on other sources.</p> <p>Memory allocation for an object is done by the JVM based on information in the <strong>class</strong> object. The JVM also initializes the instance variables to their default values. Next, the variable initializers and the initialization blocks are executed together in the order they appear in the source code. They can alter the values of the variables. <em>Finally, the constructors get a chance to modify the variables once again</em>. At that point, the object is considered fully initialized and <strong>final</strong> variables can no longer be altered.</p> <p>I have not considered the implications of <strong>super()</strong> here.</p> <p>BTW, constructors are not methods. Unlike methods, constructors can alter <strong>final</strong> variables. There are constraints on constructors that don't apply to methods. And you can't call a constructor directly.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-27912">SCJP2 Discussion / constructors</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-37244/are-constructors-really-constructing">are constructors really constructing?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36907#post-96568</guid>
				<title>Re: Object creation in Inheritance</title>
				<link>http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance#post-96568</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 13:18:23 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>[[toc]]</p> <h1><span>Answer from <strong>Sunny Jain</strong>:</span></h1> <p>Let me try to solve the confusion up to some extend :</p> <p>When Orange extends Fruit, It inherits some properties of Fruit class, when you compile Orange we need to determine which properties you inherits, generally these properties include Instance Variable,methods….and we know that Instance properties will be defined only after call to super constructor..<br /> so subclass instance properties will be defined only after super() {fruit}, superclass instance properties will be defined only after super() {Object}..if we don't invoke super…we wont be able to access superclass properties..so entire concept of inheritance vanishes…!!!</p> <p>Please correct me if I am wrong..!!!</p> <h1><span>Answer from <strong>Ernest Friedman-Hill</strong>, <em>sheriff and Author</em>:</span></h1> <p>Sunny's <em>not wrong</em>, but I don't think s/he's answered the question.</p> <p>The way to think about it: an Orange object contains a Fruit object. Every instance of a subclass has a part which is the superclass part.</p> <p>Picture the base class as a cricket ball. Now if I want to make a subclass, I add to that cricket ball by wrapping it up in tinfoil. To make a sub-subclass, I can add another layer of tinfoil. Etc, etc. There's one superclass object in the middle; subclasses are formed by adding more stuff on the outside.</p> <h1><span>Reply from <strong>Kaydell Leavitt</strong>:</span></h1> <p>If you see an orange in real life. You see an orange, a fruit, and an object, but there is really <strong>only one</strong> object — <em>the orange</em>.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance">how many objects are created (wrt inheritance)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36907#post-96564</guid>
				<title>Object creation in Inheritance</title>
				<link>http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance#post-96564</link>
				<description></description>
				<pubDate>Thu, 24 Jan 2008 13:13:47 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>JavaRanch reference thread -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=025240">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=025240</a></p> </div> <p>Original question by <strong>sarathchandra chandala</strong>:<br /> I have a subclass named Orange which extends Fruit class.. Now when I make an object of Orange,it will call the constructor of superclass fruit and then up till Object Class..</p> <p>Does this mean that actually Objects are created for Super classes when i make an object for my subclass??</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance">how many objects are created (wrt inheritance)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36907#post-95915</guid>
				<title>Re: how many objects are created (wrt inheritance)</title>
				<link>http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance#post-95915</link>
				<description></description>
				<pubDate>Wed, 23 Jan 2008 13:51:45 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p><em>Reply</em> from <strong>Ernest Friedman-Hill</strong>, <em>Sheriff and Author</em> in JavaRanch:<br /> The answer is <strong>just one object</strong>.</p> <p>An instance of B includes an A "part". Imagine a piece of paper 1 inch square, call it A. Then think of a B object as a piece of paper 2 inches square, with a 1-inch square drawn onto it labeled "A". The A constructor is called to initialize the A part of the single B object.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance">how many objects are created (wrt inheritance)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36907#post-95914</guid>
				<title>how many objects are created (wrt inheritance)</title>
				<link>http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance#post-95914</link>
				<description></description>
				<pubDate>Wed, 23 Jan 2008 13:51:31 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>[[toc]]</p> <h1><span>Question1: Inheritance - how many objects created???</span></h1> <div class="wiki-note"> <p>Reference Thead from JavaRanch: <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=024491">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=024491</a></p> </div> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">A</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-reserved">extends</span><span class="hl-code"> </span><span class="hl-identifier">A</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Try</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">){</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-identifier">obj</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-brackets">()</span><span class="hl-code"> ; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <p>Question from Original Poster <em>Imran Mehrenali</em>:</p> <p>1) In the above code, when i create an object of Class B, how many objects will get created? Only one object of class B that has 2 members (a and b) or two objects - one of class A that has one member (a), and another of class B that also has only member (b) but can directly acccess the member (a) beloning to object of class A.</p> <p>2) I was about to ask how many constructors will be called, but have tried this out myself in a java program and have found that 2 constructors (A() and B()) are called while creating an object of class B.<br /> Does this mean that 2 objects are created.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36907/how-many-objects-are-created-wrt-inheritance">how many objects are created (wrt inheritance)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36906#post-95913</guid>
				<title>how many objects are created (wrt inheritance)</title>
				<link>http://raghavan.wikidot.com/forum/t-36906/how-many-objects-are-created-wrt-inheritance#post-95913</link>
				<description></description>
				<pubDate>Wed, 23 Jan 2008 13:51:01 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>[[toc]]</p> <h1><span>Question1: Inheritance - how many objects created???</span></h1> <div class="wiki-note"> <p>Reference Thead from JavaRanch: <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=024491">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=024491</a></p> </div> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">A</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-reserved">extends</span><span class="hl-code"> </span><span class="hl-identifier">A</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Try</span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">){</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-identifier">obj</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-brackets">()</span><span class="hl-code"> ; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <p>Question from Original Poster <em>Imran Mehrenali</em>:</p> <p>1) In the above code, when i create an object of Class B, how many objects will get created? Only one object of class B that has 2 members (a and b) or two objects - one of class A that has one member (a), and another of class B that also has only member (b) but can directly acccess the member (a) beloning to object of class A.</p> <p>2) I was about to ask how many constructors will be called, but have tried this out myself in a java program and have found that 2 constructors (A() and B()) are called while creating an object of class B.<br /> Does this mean that 2 objects are created.</p> <p><em>Reply</em> from Ernest Friedman-Hill<strong>, <em>Sheriff and Author</em> in JavaRanch:<br /> The answer is **just one object</strong>.</p> <p>An instance of B includes an A "part". Imagine a piece of paper 1 inch square, call it A. Then think of a B object as a piece of paper 2 inches square, with a 1-inch square drawn onto it labeled "A". The A constructor is called to initialize the A part of the single B object.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36906/how-many-objects-are-created-wrt-inheritance">how many objects are created (wrt inheritance)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36279#post-94261</guid>
				<title>Re: doubt on notification of Threads</title>
				<link>http://raghavan.wikidot.com/forum/t-36279/doubt-on-notification-of-threads#post-94261</link>
				<description></description>
				<pubDate>Sun, 20 Jan 2008 08:51:54 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>Reply from <strong>yogi maheshnath</strong>:</p> </div> <p>Beacause its specified in syntax of wait() method in java.lang.Object.</p> <p>public final void wait(long timeout)throws InterruptedException<br /> when wait() is called, the thread becomes disabled for scheduling and lies dormant until one of four things occur:</p> <p>1. another thread invokes the notify() method for this object and the scheduler arbitrarily chooses to run the thread<br /> 2. another thread invokes the notifyAll() method for this object<br /> 3. another thread interrupts this thread<br /> 4. the specified wait() time elapses //see this one</p> <p>So,After calling wait() method, thread A will become a candidate to get another turn at the CPU,after object B is notified, or after two seconds(wait(2000)) in your example.</p> <div class="wiki-note"> <p>Reply from <strong>Henry Wong</strong>, a <em>bartender</em> of JavaRanch:</p> </div> <p><strong>B. After the lock on B is released, or after two seconds.</strong></p> <p>Wrong, but debateable. You can release the lock, and not send the notification, and the thread will not wake up. However, you can argue that two seconds later it will wake up, which technically is still *after* the lock is released.</p> <p><strong>C. Two seconds after object B is notified.</strong></p> <p>Clearly wrong. If you sleep for 2 seconds, then send the notification, the thread will wakeup immediately (assuming that it can get the lock).</p> <p><strong>D. Two seconds after lock B is released.</strong></p> <p>Clearly wrong. If you sleep for 2 seconds, then release the lock, the thread will wakeup immediately — and not two seconds after. (assuming that it can get the lock).</p> <p><strong>A. After object B is notified, or after two seconds.</strong></p> <p>Mostly right. It will wakeup sometime *after* getting the notification. Or it will wakeup sometime *after* 2 seconds. The time to acquire the lock doesn't change that — it will still be after. Of course, you can argue that the *after* implies *immediately after*…</p> <p><strong>Which one is the correct?</strong></p> <p>Now, you have 2 answers that are clearly wrong. One that is wrong, but you can argue that it is right, because one part covers the other. And one that is right, but you can argue that it is wrong, because you imply that the word after assumes immediately.</p> <p>Given this in a test, which one will you pick?</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-9695">SCJP2 Discussion / threads</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36279/doubt-on-notification-of-threads">doubt on notification of Threads</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-36279#post-94260</guid>
				<title>doubt on notification of Threads</title>
				<link>http://raghavan.wikidot.com/forum/t-36279/doubt-on-notification-of-threads#post-94260</link>
				<description></description>
				<pubDate>Sun, 20 Jan 2008 08:48:54 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>JavaRanch reference thread -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=043103">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=043103</a></p> </div> <br /> I thought that when a thread calls wait() over an object, and then someother thread calls notify(), the first one leaved the "waiting" state, and goes to the "locked" state, waiting for the second one to leave the synchronized region, and finally goes to "runnable". <p>But just when i thought that it was fairly clear, I found a question like this one:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">Assume</span><span class="hl-code"> </span><span class="hl-identifier">the</span><span class="hl-code"> </span><span class="hl-identifier">following</span><span class="hl-code"> </span><span class="hl-identifier">method</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> </span><span class="hl-identifier">properly</span><span class="hl-code"> </span><span class="hl-reserved">synchronized</span><span class="hl-code"> </span><span class="hl-identifier">and</span><span class="hl-code"> </span><span class="hl-identifier">called</span><span class="hl-code"> </span><span class="hl-identifier">from</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code"> </span><span class="hl-identifier">thread</span><span class="hl-code"> </span><span class="hl-identifier">A</span><span class="hl-code"> </span><span class="hl-identifier">on</span><span class="hl-code"> </span><span class="hl-identifier">an</span><span class="hl-code"> </span><span class="hl-identifier">object</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code">: </span><span class="hl-identifier">wait</span><span class="hl-brackets">(</span><span class="hl-number">2000</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">After</span><span class="hl-code"> </span><span class="hl-identifier">calling</span><span class="hl-code"> </span><span class="hl-reserved">this</span><span class="hl-code"> </span><span class="hl-identifier">method</span><span class="hl-code">, </span><span class="hl-identifier">when</span><span class="hl-code"> </span><span class="hl-identifier">will</span><span class="hl-code"> </span><span class="hl-identifier">the</span><span class="hl-code"> </span><span class="hl-identifier">thread</span><span class="hl-code"> </span><span class="hl-identifier">A</span><span class="hl-code"> </span><span class="hl-identifier">become</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code"> </span><span class="hl-identifier">candidate</span><span class="hl-code"> </span><span class="hl-identifier">to</span><span class="hl-code"> </span><span class="hl-identifier">get</span><span class="hl-code"> </span><span class="hl-identifier">another</span><span class="hl-code"> </span><span class="hl-identifier">turn</span><span class="hl-code"> </span><span class="hl-identifier">at</span><span class="hl-code"> </span><span class="hl-identifier">the</span><span class="hl-code"> </span><span class="hl-identifier">CPU</span><span class="hl-code">? </span><span class="hl-identifier">A</span><span class="hl-code">. </span><span class="hl-identifier">After</span><span class="hl-code"> </span><span class="hl-identifier">object</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> </span><span class="hl-identifier">notified</span><span class="hl-code">, </span><span class="hl-identifier">or</span><span class="hl-code"> </span><span class="hl-identifier">after</span><span class="hl-code"> </span><span class="hl-identifier">two</span><span class="hl-code"> </span><span class="hl-identifier">seconds</span><span class="hl-code">. </span><span class="hl-identifier">B</span><span class="hl-code">. </span><span class="hl-identifier">After</span><span class="hl-code"> </span><span class="hl-identifier">the</span><span class="hl-code"> </span><span class="hl-identifier">lock</span><span class="hl-code"> </span><span class="hl-identifier">on</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> </span><span class="hl-identifier">released</span><span class="hl-code">, </span><span class="hl-identifier">or</span><span class="hl-code"> </span><span class="hl-identifier">after</span><span class="hl-code"> </span><span class="hl-identifier">two</span><span class="hl-code"> </span><span class="hl-identifier">seconds</span><span class="hl-code">. </span><span class="hl-identifier">C</span><span class="hl-code">. </span><span class="hl-identifier">Two</span><span class="hl-code"> </span><span class="hl-identifier">seconds</span><span class="hl-code"> </span><span class="hl-identifier">after</span><span class="hl-code"> </span><span class="hl-identifier">object</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> </span><span class="hl-identifier">notified</span><span class="hl-code">. </span><span class="hl-identifier">D</span><span class="hl-code">. </span><span class="hl-identifier">Two</span><span class="hl-code"> </span><span class="hl-identifier">seconds</span><span class="hl-code"> </span><span class="hl-identifier">after</span><span class="hl-code"> </span><span class="hl-identifier">lock</span><span class="hl-code"> </span><span class="hl-identifier">B</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> </span><span class="hl-identifier">released</span><span class="hl-code">. </span><span class="hl-identifier">Which</span><span class="hl-code"> </span><span class="hl-identifier">one</span><span class="hl-code"> </span><span class="hl-identifier">is</span><span class="hl-code"> </span><span class="hl-identifier">the</span><span class="hl-code"> </span><span class="hl-identifier">correct</span><span class="hl-code">?</span> </pre></div> </div> <p>The books says that A, but I simply don't get it, to me, there are no correct question.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-9695">SCJP2 Discussion / threads</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-36279/doubt-on-notification-of-threads">doubt on notification of Threads</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-11999#post-90353</guid>
				<title>how many objects are created (wrt arrays)</title>
				<link>http://raghavan.wikidot.com/forum/t-11999/how-many-objects-are-created-wrt-arrays#post-90353</link>
				<description></description>
				<pubDate>Sat, 12 Jan 2008 10:31:07 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>How many objects are created by the following two statements?</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-brackets">[</span><span class="hl-number">10</span><span class="hl-brackets">]</span><span class="hl-code">; </span><span class="hl-types">int</span><span class="hl-brackets">[][]</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-brackets">[</span><span class="hl-number">10</span><span class="hl-brackets">][</span><span class="hl-number">10</span><span class="hl-brackets">]</span><span class="hl-code">;</span> </pre></div> </div> <div class="wiki-note"> <p>JavaRanch thread url -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=043127">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=043127</a></p> </div> <p>Answer given by <strong>Henry Wong:</strong></p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">a</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-brackets">[</span><span class="hl-number">10</span><span class="hl-brackets">]</span><span class="hl-code">;</span> </pre></div> </div> <p><strong>Just one</strong>. The <em>int array object</em>. The 10 ints are not objects.</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-brackets">[][]</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-brackets">[</span><span class="hl-number">10</span><span class="hl-brackets">][</span><span class="hl-number">10</span><span class="hl-brackets">]</span><span class="hl-code">;</span> </pre></div> </div> <p><strong>Eleven</strong>. <em>One array</em> of int array objects. And <em>10 int array objects</em>. Again, the ints are not objects.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-11999/how-many-objects-are-created-wrt-arrays">how many objects are created (wrt arrays)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-14914#post-37292</guid>
				<title>how many public classes in a .java file allowed?</title>
				<link>http://raghavan.wikidot.com/forum/t-14914/how-many-public-classes-in-a-java-file-allowed#post-37292</link>
				<description></description>
				<pubDate>Thu, 26 Jul 2007 15:58:15 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>In a java file how many public classes can be present?</p> <p>The answer is ONLY ONE. But most refined answer is <strong>Only one Public Class</strong>, since there may be public nested class inside the same .java file which is legally allowed.</p> <p>source : A Javaranch thread -&gt; <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=023337">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=33&amp;t=023337</a></p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-12515">SCJP2 Discussion / classes, access modifiers</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-14914/how-many-public-classes-in-a-java-file-allowed">how many public classes in a .java file allowed?</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-13396#post-33533</guid>
				<title>what is the output? (wrt to post increment operator)</title>
				<link>http://raghavan.wikidot.com/forum/t-13396/what-is-the-output-wrt-to-post-increment-operator#post-33533</link>
				<description></description>
				<pubDate>Tue, 10 Jul 2007 07:45:22 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>Reference from the JavaRanch thread -&gt;</p> <p><a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=039606">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=039606</a></p> </div> <p>What is the output of the below program?</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-reserved">class</span><span class="hl-code"> </span><span class="hl-identifier">Increment</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">getNum</span><span class="hl-brackets">(</span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">x</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-reserved">return</span><span class="hl-code"> </span><span class="hl-identifier">x</span><span class="hl-code">++; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-reserved">public</span><span class="hl-code"> </span><span class="hl-types">static</span><span class="hl-code"> </span><span class="hl-types">void</span><span class="hl-code"> </span><span class="hl-identifier">main</span><span class="hl-brackets">(</span><span class="hl-identifier">String</span><span class="hl-brackets">[]</span><span class="hl-code"> </span><span class="hl-identifier">args</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-brackets">{</span><span class="hl-code"> </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-identifier">getNum</span><span class="hl-brackets">(</span><span class="hl-number">44</span><span class="hl-brackets">))</span><span class="hl-code">; </span><span class="hl-brackets">}</span><span class="hl-code"> </span><span class="hl-brackets">}</span> </pre></div> </div> <p>The options for the answers are :</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-brackets">(</span><span class="hl-identifier">a</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-number">44</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">b</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-number">45</span><span class="hl-code"> </span><span class="hl-brackets">(</span><span class="hl-identifier">c</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-number">46</span> </pre></div> </div> <p><strong>Output:</strong></p> <p>The answer is :</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-brackets">(</span><span class="hl-identifier">a</span><span class="hl-brackets">)</span><span class="hl-code"> </span><span class="hl-number">44</span> </pre></div> </div> <p><strong>Reason with Explanation by Henry:</strong><br /> When the getNum() method calculates to value to be returned, it will use the value of x before it gets incremented (post increment means the value of x will be incremented after it has been used).</p> <p>Sure, the value of x will be incremented, but the value to be returned has already been calculated by then.</p> <p><strong>Reason with Explanation by me:</strong><br /> Its more or less the same of assignment.</p> <p>When you have</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">x</span><span class="hl-code"> = </span><span class="hl-number">2</span><span class="hl-code">; </span><span class="hl-types">int</span><span class="hl-code"> </span><span class="hl-identifier">y</span><span class="hl-code"> = </span><span class="hl-identifier">x</span><span class="hl-code">++; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">x = </span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-identifier">x</span><span class="hl-code">+</span><span class="hl-quotes">"</span><span class="hl-string">, y = </span><span class="hl-quotes">"</span><span class="hl-code">+</span><span class="hl-identifier">y</span><span class="hl-brackets">)</span><span class="hl-code">;</span> </pre></div> </div> <p>The above SOP will print the value as:</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">x</span><span class="hl-code"> = </span><span class="hl-number">3</span><span class="hl-code">, </span><span class="hl-identifier">y</span><span class="hl-code"> = </span><span class="hl-number">2</span> </pre></div> </div> <p>Why? and How? The value of x is being used in the operation first (ie., assignment). After the appropriate operation (here assignment) is done, the value of x is incremented! Right?</p> <p>The same holds good in terms of your method as well. <strong>The value of x is being used for its operation (here, return value) first and then its incremented</strong>. But that does NOT mean that the updated value of x (incremented here) will be reflected back because the updation happens only after the value of x is being used (returned).</p> <p>Hope this helps!</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-11573">SCJP2 Discussion / operators</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-13396/what-is-the-output-wrt-to-post-increment-operator">what is the output? (wrt to post increment operator)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-12372#post-30918</guid>
				<title>how many objects (wrt Strings)</title>
				<link>http://raghavan.wikidot.com/forum/t-12372/how-many-objects-wrt-strings#post-30918</link>
				<description></description>
				<pubDate>Tue, 26 Jun 2007 07:19:22 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <div class="wiki-note"> <p>famous question on how many objects are created with respect to Strings (and literals).<br /> Reference from javaranch: <a href="http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=039347">http://saloon.javaranch.com/cgi-bin/ubb/ultimatebb.cgi?ubb=get_topic&amp;f=24&amp;t=039347</a><br /> (though there were similar threads for the same post, this one is recent)</p> </div> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">s1</span><span class="hl-code"> = </span><span class="hl-quotes">"</span><span class="hl-string">spring </span><span class="hl-quotes">"</span><span class="hl-code">; </span><span class="hl-identifier">String</span><span class="hl-code"> </span><span class="hl-identifier">s2</span><span class="hl-code"> = </span><span class="hl-identifier">s1</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string">summer </span><span class="hl-quotes">"</span><span class="hl-code">; </span><span class="hl-identifier">s1</span><span class="hl-code">.</span><span class="hl-identifier">concat</span><span class="hl-brackets">(</span><span class="hl-quotes">"</span><span class="hl-string">fall </span><span class="hl-quotes">"</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">s2</span><span class="hl-code">.</span><span class="hl-identifier">concat</span><span class="hl-brackets">(</span><span class="hl-identifier">s1</span><span class="hl-brackets">)</span><span class="hl-code">; </span><span class="hl-identifier">s1</span><span class="hl-code"> += </span><span class="hl-quotes">"</span><span class="hl-string">winter </span><span class="hl-quotes">"</span><span class="hl-code">; </span><span class="hl-identifier">System</span><span class="hl-code">.</span><span class="hl-identifier">out</span><span class="hl-code">.</span><span class="hl-identifier">println</span><span class="hl-brackets">(</span><span class="hl-identifier">s1</span><span class="hl-code"> + </span><span class="hl-quotes">"</span><span class="hl-string"> </span><span class="hl-quotes">"</span><span class="hl-code"> + </span><span class="hl-identifier">s2</span><span class="hl-brackets">)</span><span class="hl-code">;</span> </pre></div> </div> <p><strong>Answer:</strong></p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-identifier">a</span><span class="hl-code">. </span><span class="hl-number">8</span><span class="hl-code"> </span><span class="hl-identifier">b</span><span class="hl-code">. </span><span class="hl-number">6</span><span class="hl-code"> </span><span class="hl-identifier">c</span><span class="hl-code">. </span><span class="hl-number">10</span><span class="hl-code"> </span><span class="hl-identifier">d</span><span class="hl-code">. </span><span class="hl-number">4</span> </pre></div> </div> <p>Answer is <strong>c. 10</strong></p> <p><strong>Explanation</strong><br /> 1 object ("spring") created in line 1<br /> 2 objects ("springsummer" and "summer") in line 2<br /> 2 objects ("springfall" and "fall") in line 3<br /> 1 object ("springsummerspring") in line 4<br /> 2 objects ("springwinter" and "winter") in line 5<br /> 2 objects ("spring "(with space at end) and "spring springsummer") in line 6</p> <p>So in total there are <strong>ten</strong> objects</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-12372/how-many-objects-wrt-strings">how many objects (wrt Strings)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-11999#post-30036</guid>
				<title>Re: how many objects are created (wrt arrays)</title>
				<link>http://raghavan.wikidot.com/forum/t-11999/how-many-objects-are-created-wrt-arrays#post-30036</link>
				<description></description>
				<pubDate>Thu, 21 Jun 2007 11:49:14 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>The answer is <strong>3. (1,4)</strong>.</p> <p><strong>Explanation:</strong></p> <p>Statement 1: There is an object created for the 2D Array which can hold 3 individual 1D int arrays but they themselves are not initialized as such. So, the answer is <strong>1 object</strong> for this statement.</p> <p>Statement 2: Here, there is one object created for 2D Array and since the 2D Array object is <strong>fully initialized with both the dimensions</strong>, there are 3 objects created which is nothing but the rowsize. Altogether, there are <strong>4 objects</strong> created for this.</p> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-11999/how-many-objects-are-created-wrt-arrays">how many objects are created (wrt arrays)</a>
				 	]]>
				</content:encoded>							</item>
					<item>
				<guid>http://raghavan.wikidot.com/forum/t-11999#post-30014</guid>
				<title>how many objects are created (wrt arrays)</title>
				<link>http://raghavan.wikidot.com/forum/t-11999/how-many-objects-are-created-wrt-arrays#post-30014</link>
				<description></description>
				<pubDate>Thu, 21 Jun 2007 10:23:19 +0000</pubDate>
				<wikidot:authorName>itsraghz</wikidot:authorName>				<wikidot:authorUserId>20174</wikidot:authorUserId>				<content:encoded>
					<![CDATA[
						 <p>How many objects are created after executing the statements individually.</p> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-brackets">[][]</span><span class="hl-code"> </span><span class="hl-number">2</span><span class="hl-identifier">dArray</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-brackets">[</span><span class="hl-number">3</span><span class="hl-brackets">][]</span><span class="hl-code">;</span> </pre></div> </div> <div class="code"> <div class="hl-main"> <pre> <span class="hl-types">int</span><span class="hl-brackets">[][]</span><span class="hl-code"> </span><span class="hl-number">2</span><span class="hl-identifier">dArray</span><span class="hl-code"> = </span><span class="hl-reserved">new</span><span class="hl-code"> </span><span class="hl-types">int</span><span class="hl-brackets">[</span><span class="hl-number">3</span><span class="hl-brackets">][</span><span class="hl-number">2</span><span class="hl-brackets">]</span><span class="hl-code">;</span> </pre></div> </div> <p><strong>Pick the correct answer from the options given below:</strong></p> <ol> <li>(1,1)</li> <li>(2,2)</li> <li>(1,4)</li> <li>(2,4)</li> <li>(2,3)</li> </ol> <br/>Forum category: <a href="http://raghavan.wikidot.com/forum/c-10388">SCJP2 Discussion / memory related</a><br/>Forum thread: <a href="http://raghavan.wikidot.com/forum/t-11999/how-many-objects-are-created-wrt-arrays">how many objects are created (wrt arrays)</a>
				 	]]>
				</content:encoded>							</item>
				</channel>
</rss>