<?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: Singleton Design Pattern</title>
	<atom:link href="http://www.caughtbyjava.com/singleton-design-pattern/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.caughtbyjava.com/singleton-design-pattern/</link>
	<description>Just another Technology Blog</description>
	<lastBuildDate>Sun, 20 Jun 2010 10:35:17 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Aman</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-59</link>
		<dc:creator>Aman</dc:creator>
		<pubDate>Fri, 21 Aug 2009 04:06:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-59</guid>
		<description>Use ENUMS if you are using java 1.5 or above.</description>
		<content:encoded><![CDATA[Use ENUMS if you are using java 1.5 or above.]]></content:encoded>
	</item>
	<item>
		<title>By: Aputin</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-28</link>
		<dc:creator>Aputin</dc:creator>
		<pubDate>Tue, 11 Aug 2009 08:07:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-28</guid>
		<description>You can use static initializer too but the direct benefit that you get is &quot;Lazy Loading&quot; using this implemenation.</description>
		<content:encoded><![CDATA[You can use static initializer too but the direct benefit that you get is &#8220;Lazy Loading&#8221; using this implemenation.]]></content:encoded>
	</item>
	<item>
		<title>By: Stefaan</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-26</link>
		<dc:creator>Stefaan</dc:creator>
		<pubDate>Mon, 10 Aug 2009 18:31:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-26</guid>
		<description>What if you initialize a static public or private final INSTANCE in a static {} block? You don&#039;t need to synchronize.  The only difference is that you allocate memory from the moment you reference and load the class, I think.</description>
		<content:encoded><![CDATA[What if you initialize a static public or private final INSTANCE in a static {} block? You don&#8217;t need to synchronize.  The only difference is that you allocate memory from the moment you reference and load the class, I think.]]></content:encoded>
	</item>
	<item>
		<title>By: Aputin</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-25</link>
		<dc:creator>Aputin</dc:creator>
		<pubDate>Mon, 10 Aug 2009 16:13:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-25</guid>
		<description>Somebody had been asking about how to call a singleton class in java? Well the answer is that in your class just call the static method getInstance() of the singleton class. Like<br /><br />public void yourMethod() {<br /><br />.....<br /><br />// returns the instance of the singleton class&lt;br /&gt;Singleton object = Singleton.getInstance();<br /><br />// call the method that performs the job. &lt;br /&gt;// Let us say object.log(&quot;log this message&quot;);<br /><br />}</description>
		<content:encoded><![CDATA[Somebody had been asking about how to call a singleton class in java? Well the answer is that in your class just call the static method getInstance() of the singleton class. Like<br /><br />public void yourMethod() {<br /><br />&#8230;..<br /><br />// returns the instance of the singleton class<br />Singleton object = Singleton.getInstance();<br /><br />// call the method that performs the job. <br />// Let us say object.log(&#8220;log this message&#8221;);<br /><br />}]]></content:encoded>
	</item>
	<item>
		<title>By: Aputin</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-21</link>
		<dc:creator>Aputin</dc:creator>
		<pubDate>Wed, 05 Aug 2009 13:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-21</guid>
		<description>Any class that has a default constructor as private cannot be extended by any other class. That means this Singleton class will never have a derived class.</description>
		<content:encoded><![CDATA[Any class that has a default constructor as private cannot be extended by any other class. That means this Singleton class will never have a derived class.]]></content:encoded>
	</item>
	<item>
		<title>By: Aputin</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-20</link>
		<dc:creator>Aputin</dc:creator>
		<pubDate>Wed, 05 Aug 2009 13:01:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-20</guid>
		<description>Yes you are correct only when the Singleton has the default constructor as public. But in this Implementation of Singleton we have kept default constructor as private that protects it from being extended.</description>
		<content:encoded><![CDATA[Yes you are correct only when the Singleton has the default constructor as public. But in this Implementation of Singleton we have kept default constructor as private that protects it from being extended.]]></content:encoded>
	</item>
	<item>
		<title>By: Prakash panigrahi</title>
		<link>http://www.caughtbyjava.com/singleton-design-pattern/comment-page-1/#comment-19</link>
		<dc:creator>Prakash panigrahi</dc:creator>
		<pubDate>Wed, 05 Aug 2009 12:38:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.caughtbyjava.com/?p=6#comment-19</guid>
		<description>Can You tell me if this class will be a deriver calss from one base class which has overridden clone() method i.e the superclass implements clonable interface .Still i can create more then one object in your Singleton  class by using clone() method.I think the best way to do this is to make this Singleton class as final ,Let me know if i am wrong.i.e <br /><br />public static  final Singleton getInstance() {</description>
		<content:encoded><![CDATA[Can You tell me if this class will be a deriver calss from one base class which has overridden clone() method i.e the superclass implements clonable interface .Still i can create more then one object in your Singleton  class by using clone() method.I think the best way to do this is to make this Singleton class as final ,Let me know if i am wrong.i.e <br /><br />public static  final Singleton getInstance() {]]></content:encoded>
	</item>
</channel>
</rss>
