<?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>SCJP Certification &#187; constructors</title>
	<atom:link href="http://www.scjp-certification.com/tag/constructors/feed" rel="self" type="application/rss+xml" />
	<link>http://www.scjp-certification.com</link>
	<description>Sun Certified Java Programmer Certification exam essentials</description>
	<lastBuildDate>Fri, 30 Sep 2011 05:54:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>What is constructor overloadng?</title>
		<link>http://www.scjp-certification.com/what-is-constructor-overloadng.html</link>
		<comments>http://www.scjp-certification.com/what-is-constructor-overloadng.html#comments</comments>
		<pubDate>Sat, 19 Sep 2009 11:52:44 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[constructor overloading]]></category>
		<category><![CDATA[constructors]]></category>
		<category><![CDATA[subclass]]></category>
		<category><![CDATA[super]]></category>
		<category><![CDATA[superclass]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=233</guid>
		<description><![CDATA[Constructor overloading is a methodology that allows a class can have any number of constructors that differ in parameter lists....]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-constructor-overloadng.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-constructor-overloadng.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p><strong>Constructor</strong> overloading is a methodology that allows a class can have any number of constructors that differ in parameter lists. A constructor initialize&#8217;s the new object&#8217;s state by using its arguments. The compiler differentiates these constructors by taking into account the number of parameters in the list and their types. Constructors are not members of a class, so they are not inherited by subclasses. Therefore, each of the subclasses must specifically implement any constructors it needs. However, a subclass can use the constructors of its superclass by using the super keyword.</p>
<p>The following code describes how constructor overloading works:</p>
<p><strong>class ABC{<br />
ABC(){<br />
    System.out.print(&#8220;ABC &#8220;);<br />
 }<br />
ABC(String value){<br />
   this();<br />
   System.out.print(&#8220;abc &#8221; + value);<br />
    }<br />
   }<br />
public class XYZ extends ABC<br />
 {<br />
   XYZ(){<br />
     System.out.print(&#8220;XYZ &#8220;);<br />
   }<br />
   XYZ(String value){<br />
         this();<br />
         System.out.print(&#8220;xyz &#8221; + value);<br />
       }<br />
public static void main(String[] args){<br />
    new XYZ(&#8220;value &#8220;);<br />
     }<br />
   } </strong></p>
<p>A constructor is always invoked when a new object is created. Each superclass in an object&#8217;s inheritance tree will have a constructor called. Here the constructors execute as follows:
<ol>
<li>The constructor calls its superclass constructor, which calls its superclass constructor, and so on all the way up to the Object constructor.</li>
<li>The Object constructor executes and then returns to the calling constructor, which runs to completion and then returns to its calling constructor, and so on back down to completion of the constructor of the actual instance being created.</li>
</ol>
<p> A constructor is invoked when a new object is created, the constructor calls its superclass constructor, which calls its superclass constructor and so on all the way up to the Object constructor and hence the output is ABC XYZ xyz value. </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-constructor-overloadng.html&amp;title=What%20is%20constructor%20overloadng%3F"><img src="http://www.scjp-certification.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.scjp-certification.com/what-is-constructor-overloadng.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the Locale class?</title>
		<link>http://www.scjp-certification.com/what-is-the-locale-class.html</link>
		<comments>http://www.scjp-certification.com/what-is-the-locale-class.html#comments</comments>
		<pubDate>Mon, 07 Sep 2009 11:58:16 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[constructors]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[locale]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=169</guid>
		<description><![CDATA[The Locale class is used to provide a number of convenient constants that are used to create Locale objects for...]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-the-locale-class.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-the-locale-class.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The Locale class is used to provide a number of convenient constants that are used to create Locale objects for commonly used locales. It is a mechanism for identifying objects, not a container for the objects themselves. The Locale class is used to represent an object that describes a geographical, cultural, or political region. This class is particularly useful for internationalization. Each region has different formats to present the date, time, and numbers. The Locale class is used to present these formats. The Locale class has the following constructors:
<ul>
<li><strong>Locale(String language)</strong><br />
This constructor builds a locale object to represent a language specific to a region.</li>
</ul>
<ul>
<li><strong>Locale(String language, String country)</strong><br />
This constructor builds a locale object to represent a language specific to a country.</li>
</ul>
<ul>
<li><strong>Locale(String language, String country, String var)</strong> This constructor builds a locale object to represent a language specific to a country. The argument var provides the information about the specific vendor or the browser.</li>
</ul>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-the-locale-class.html&amp;title=What%20is%20the%20Locale%20class%3F"><img src="http://www.scjp-certification.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a> </p>]]></content:encoded>
			<wfw:commentRss>http://www.scjp-certification.com/what-is-the-locale-class.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

