<?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; Java Facts</title>
	<atom:link href="http://www.scjp-certification.com/category/java-facts/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 association?</title>
		<link>http://www.scjp-certification.com/what-is-association.html</link>
		<comments>http://www.scjp-certification.com/what-is-association.html#comments</comments>
		<pubDate>Fri, 30 Sep 2011 05:54:18 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1097</guid>
		<description><![CDATA[An association represents a relationship between classes. It represents a mechanism that allows objects to communicate with each other. It...]]></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-association.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-association.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>An association represents a relationship between classes. It represents a mechanism that allows objects to communicate with each other. It describes the connection between different classes.</p>
<p>Association can be unidirectional or bi-directional. </p>
<p>A unidirectional association implies that an object of the class from which the arrow is originating, i.e., the class that has the no-arrowhead side of the association may invoke methods on the class towards which the arrow is pointing. </p>
<p>A bi-directional association means that either object in the association may invoke methods on the other.</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-association.html&amp;title=What%20is%20association%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-association.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is narrowing conversion?</title>
		<link>http://www.scjp-certification.com/what-is-narrowing-conversion.html</link>
		<comments>http://www.scjp-certification.com/what-is-narrowing-conversion.html#comments</comments>
		<pubDate>Wed, 28 Sep 2011 05:55:04 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1099</guid>
		<description><![CDATA[In Java, a narrowing conversion is also known as an explicit type conversion or casting. When the destination data type...]]></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-narrowing-conversion.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-narrowing-conversion.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In Java, a narrowing conversion is also known as an explicit type conversion or casting. When the destination data type is narrower than the source data type, an explicit type conversion is required. The general form of this explicit conversion is given below:</p>
<p>(target-type) value</p>
<p>Here, target-type is the desired data type and value is the value to be converted.</p>
<p>For example:</p>
<p>int a, int b;<br />
short c;<br />
c= (short)(a+b);</p>
<p>Here, the sum of two 32-bit integer data type variables a and b is assigned to another variable c, which is of integer type short (16-bit). Therefore, an explicit conversion takes place before assigning the value to c. Otherwise, if this explicit type conversion is not performed, and the sum of variables a and b is directly assigned to variable c, a compile-time error will be generated.</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-narrowing-conversion.html&amp;title=What%20is%20narrowing%20conversion%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-narrowing-conversion.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is runtime polymorphism or dynamic method dispatch?</title>
		<link>http://www.scjp-certification.com/what-is-runtime-polymorphism-or-dynamic-method-dispatch.html</link>
		<comments>http://www.scjp-certification.com/what-is-runtime-polymorphism-or-dynamic-method-dispatch.html#comments</comments>
		<pubDate>Wed, 28 Sep 2011 05:48:00 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1090</guid>
		<description><![CDATA[In Java, runtime polymorphism or dynamic method dispatch is a process in which a call to an overridden method is...]]></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-runtime-polymorphism-or-dynamic-method-dispatch.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-runtime-polymorphism-or-dynamic-method-dispatch.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>In Java, runtime polymorphism or dynamic method dispatch is a process in which a call to an overridden method is resolved at runtime rather than at compile-time. In this process, an overridden method is called through the reference variable of a superclass. The determination of the method to be called is based on the object being referred to by the reference variable. For example:</p>
<p>class Try    {<br />
      void disp()   {}<br />
}</p>
<p>class Test extends Try    {<br />
      void disp()   {}<br />
      public static void main(String args[]){<br />
         Try t=new Try();<br />
         Test t1=new Test();<br />
         Try v;<br />
         v=t1;<br />
         v.disp(); // call to the disp() method from Test.<br />
      }<br />
}</p>
<p>Here, the Test version of the disp() method is called because the reference variable v of the type Try points to the Test object t1.</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-runtime-polymorphism-or-dynamic-method-dispatch.html&amp;title=What%20is%20runtime%20polymorphism%20or%20dynamic%20method%20dispatch%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-runtime-polymorphism-or-dynamic-method-dispatch.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is coupling?</title>
		<link>http://www.scjp-certification.com/what-is-coupling.html</link>
		<comments>http://www.scjp-certification.com/what-is-coupling.html#comments</comments>
		<pubDate>Sun, 25 Sep 2011 05:47:58 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1088</guid>
		<description><![CDATA[Coupling is a term that describes the degree to which one module relies on another module for its proper functioning....]]></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-coupling.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-coupling.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Coupling is a term that describes the degree to which one module relies on  another module for its proper functioning. Coupling is mainly of the following two types:
<ul>
<li><uc:hed>Loose coupling</uc:hed>: Loose or weak coupling implies that a change in one module does not require changes in the implementation of another module.</li>
<li><uc:hed>Tight coupling</uc:hed>: Tight or strong coupling implies that a module relies on another module so strongly that a small change in one will require an implementation change in the other.
 </li>
</ul>
<p>For a good object-oriented design, loose coupling is desirable.</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-coupling.html&amp;title=What%20is%20coupling%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-coupling.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is polymorphism?</title>
		<link>http://www.scjp-certification.com/what-is-polymorphism.html</link>
		<comments>http://www.scjp-certification.com/what-is-polymorphism.html#comments</comments>
		<pubDate>Thu, 22 Sep 2011 05:47:58 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1089</guid>
		<description><![CDATA[Polymorphism is a feature that allows an interface in Java to be used by many classes for different purposes. The...]]></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-polymorphism.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-polymorphism.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Polymorphism is a feature that allows an interface in Java to be used by many classes for different purposes. The word polymorphism combines poly with morphism, which means many forms. Some examples of polymorphism are overloading and overriding. Polymorphism allows an interface to be used for a general class of actions.</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-polymorphism.html&amp;title=What%20is%20polymorphism%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-polymorphism.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is inheritance?</title>
		<link>http://www.scjp-certification.com/what-is-inheritance-2.html</link>
		<comments>http://www.scjp-certification.com/what-is-inheritance-2.html#comments</comments>
		<pubDate>Sat, 17 Sep 2011 05:47:57 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1086</guid>
		<description><![CDATA[Inheritance is a process by which objects of a class acquire the properties of the objects of another class. It...]]></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-inheritance-2.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-inheritance-2.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Inheritance is a process by which objects of a class acquire the properties of the objects of another class. It supports the concept of hierarchical classification. It not only allows objects to be reused, but also allows the creation of new objects by extending the existing ones. By using the inheritance, a generic class can be created that can then be inherited by other more specific classes. In Java terminology, a class that is inherited is called a superclass, and the class that inherits another class is called a subclass. A subclass inherits all the instance variables (attributes) and methods (operations) defined in the superclass.</p>
<p>In Java, a class is declared to inherit another class by using the extends keyword.</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-inheritance-2.html&amp;title=What%20is%20inheritance%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-inheritance-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are static variables?</title>
		<link>http://www.scjp-certification.com/what-are-static-variables.html</link>
		<comments>http://www.scjp-certification.com/what-are-static-variables.html#comments</comments>
		<pubDate>Thu, 15 Sep 2011 05:47:57 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1085</guid>
		<description><![CDATA[Variables that have only one copy per class are known as static variables. They are not attached to a particular...]]></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-are-static-variables.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-static-variables.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Variables that have only one copy per class are known as static variables. They are not attached to a particular instance of a class but rather belong to a class as a whole. They are declared by using the static keyword as a modifier. For example:</p>
<p>static type varIdentifier;</p>
<p>where, the name of the variable is varIdentifier and its data type is specified by type.</p>
<p>Static variables that are not explicitly initialized in the code are automatically initialized with a default value. The default value depends on the data type of the variables. The table given below shows the default values:</p>
<table border='1'>
<tr>
<td><uc:hed>Data Type</uc:hed> </td>
<td><uc:hed>Initial Value</uc:hed> </td>
</tr>
<tr>
<td>boolean</td>
<td>false</td>
</tr>
<tr>
<td>byte</td>
<td>0</td>
</tr>
<tr>
<td>short</td>
<td>0</td>
</tr>
<tr>
<td>int</td>
<td>0</td>
</tr>
<tr>
<td>long</td>
<td>0L</td>
</tr>
<tr>
<td>char</td>
<td>&#8216;u0000&#8242;</td>
</tr>
<tr>
<td>float</td>
<td>0.0F</td>
</tr>
<tr>
<td>double</td>
<td>0.0D</td>
</tr>
<tr>
<td>Object reference</td>
<td>null</td>
</tr>
</table>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-static-variables.html&amp;title=What%20are%20static%20variables%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-are-static-variables.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is a default constructor?</title>
		<link>http://www.scjp-certification.com/what-is-a-default-constructor-2.html</link>
		<comments>http://www.scjp-certification.com/what-is-a-default-constructor-2.html#comments</comments>
		<pubDate>Sun, 11 Sep 2011 05:44:20 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1080</guid>
		<description><![CDATA[A constructor without any parameters is known as a default constructor. When a class is defined without any constructor, the...]]></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-a-default-constructor-2.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-a-default-constructor-2.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>A constructor without any parameters is known as a default constructor. When a class is defined without any constructor, the Java compiler provides an implicit default constructor. The implicit default constructor is equivalent to the following implementation: </p>
<p>class name(){<br />
   super();<br />
}</p>
<p>When the implicit default constructor of a class is invoked, it implicitly calls the no parameter constructor in the superclass. This action taken by a default constructor ensures that the inherited state of the object is initialized properly. In addition, it initializes all the instance variables in the object to the default value depending on their data type.</p>
<p>The default constructor of a class has the same access modifier with which the class has been declared. For example, the default constructor of a public class is implicitly given the public access. The default constructor of a protected class is implicitly given the protected access. The default constructor of a private class is implicitly given the private access. Otherwise, the default constructor has the default access implied by no access modifier.</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-a-default-constructor-2.html&amp;title=What%20is%20a%20default%20constructor%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-a-default-constructor-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What symbols are used to represent modifiers in UML?</title>
		<link>http://www.scjp-certification.com/what-symbols-are-used-to-represent-modifiers-in-uml.html</link>
		<comments>http://www.scjp-certification.com/what-symbols-are-used-to-represent-modifiers-in-uml.html#comments</comments>
		<pubDate>Thu, 08 Sep 2011 05:44:19 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1079</guid>
		<description><![CDATA[UML uses various types of graphical notations to represent different relationships, operations, and attributes. In UML, each modifier is represented...]]></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-symbols-are-used-to-represent-modifiers-in-uml.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-symbols-are-used-to-represent-modifiers-in-uml.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>UML uses various types of graphical notations to represent different relationships, operations, and attributes. In UML, each modifier is represented by a symbol, as shown in the table below:</p>
<table border="1">
<tr>
<th>Modifiers</th>
<th>Symbol</th>
</tr>
<tr>
<td>Public methods or classes</td>
<td>+</td>
</tr>
<tr>
<td>Private methods, elements, or classes</td>
<td>-</td>
</tr>
<tr>
<td>Protected methods, elements, or variables</td>
<td>#</td>
</tr>
<tr>
<td>Static methods, elements, or variables </td>
<td>Underlined</td>
</tr>
</table>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-symbols-are-used-to-represent-modifiers-in-uml.html&amp;title=What%20symbols%20are%20used%20to%20represent%20modifiers%20in%20UML%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-symbols-are-used-to-represent-modifiers-in-uml.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is multiplicity?</title>
		<link>http://www.scjp-certification.com/what-is-multiplicity-2.html</link>
		<comments>http://www.scjp-certification.com/what-is-multiplicity-2.html#comments</comments>
		<pubDate>Mon, 05 Sep 2011 05:44:16 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1078</guid>
		<description><![CDATA[The multiplicity of a relationship between two classes defines the number of objects of one class in relation to the...]]></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-multiplicity-2.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-multiplicity-2.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The multiplicity of a relationship between two classes defines the number of objects of one class in  relation to the number of objects of another class. In UML, the multiplicity of zero to many is represented by an asterisk(*)  symbol. A one to many relationship is represented by using the 1..* notation.  The following table describes the common multiplicities:</p>
<table border=1>
<tr>
<th>Multiplicity</th>
<th>Representation</th>
</tr>
<tr>
<td> Exactly one instance</td>
<td>1 </td>
</tr>
<tr>
<td>Zero or more instances</td>
<td>0..* or *</td>
</tr>
<tr>
<td>One or more instances</td>
<td> 1..*</td>
</tr>
<tr>
<td>No instances or one instance</td>
<td>0..1</td>
</tr>
</table>
<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-multiplicity-2.html&amp;title=What%20is%20multiplicity%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-multiplicity-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is agrregation?</title>
		<link>http://www.scjp-certification.com/what-is-agrregation.html</link>
		<comments>http://www.scjp-certification.com/what-is-agrregation.html#comments</comments>
		<pubDate>Sat, 03 Sep 2011 05:44:15 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1077</guid>
		<description><![CDATA[Aggregation is a type of association that specifies a whole/part relationship between the aggregate (whole) and a component part. It...]]></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-agrregation.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-agrregation.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Aggregation is a type of association that specifies a whole/part relationship between the aggregate (whole) and a component part. It differs from composition in that it does not imply ownership. In composition, when the owning object is destroyed, so are the contained objects. Following are the characteristics of aggregation:
<ol>
<li>It does not imply ownership. </li>
<li>It is an asymmetric relationship.</li>
<li>It is a transitive relationship.</li>
<li>It implies stronger coupling behavior (copy, delete, etc.).</li>
</ol>
<p><!--no ref--></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-agrregation.html&amp;title=What%20is%20agrregation%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-agrregation.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is composition?</title>
		<link>http://www.scjp-certification.com/what-is-composition.html</link>
		<comments>http://www.scjp-certification.com/what-is-composition.html#comments</comments>
		<pubDate>Thu, 01 Sep 2011 05:43:34 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1074</guid>
		<description><![CDATA[When one object is responsible for the lifecycle management of another object, this relationship is known as composition. Composition represents...]]></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-composition.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-composition.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>When one object is responsible for the lifecycle management of another object, this relationship is known as composition. Composition represents a &#8220;has-a&#8221; type relationship. Compositions are a critical building block of many basic data structures, including the tagged union, the linked list, and the binary tree, as well as the object used in object-oriented programming. In UML, composition is depicted as a filled diamond and a solid line. It always implies a multiplicity of 1 or 0..1, as no more than one object at a time can have lifetime responsibility for another object. In an &#8220;is a&#8221; relationship, the derived class is clearly a kind of the base class.</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-composition.html&amp;title=What%20is%20composition%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-composition.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are the limitations of enterprise beans?</title>
		<link>http://www.scjp-certification.com/what-are-the-limitations-of-enterprise-beans.html</link>
		<comments>http://www.scjp-certification.com/what-are-the-limitations-of-enterprise-beans.html#comments</comments>
		<pubDate>Sun, 03 Jul 2011 09:05:29 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=1005</guid>
		<description><![CDATA[Enterprise beans use the services provided by the EJB container. However, in order to avoid conflicts with these services, the...]]></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-are-the-limitations-of-enterprise-beans.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-limitations-of-enterprise-beans.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Enterprise beans use the services provided by the EJB container. However, in order to avoid conflicts with these services, the enterprise beans are prevented from performing the following operations:
<ol>
<li>Managing or synchronizing threads</li>
<li>Loading a native directory</li>
<li>Accessing the files and directories with the java.io package</li>
<li>Using the AWT functionality such as displaying information from a keyboard</li>
<li>Using sockets or multicasting, and accepting connections on a socket</li>
<li>Setting a socket factory used by Server Socket</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-limitations-of-enterprise-beans.html&amp;title=What%20are%20the%20limitations%20of%20enterprise%20beans%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-are-the-limitations-of-enterprise-beans.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is method overloading?</title>
		<link>http://www.scjp-certification.com/818.html</link>
		<comments>http://www.scjp-certification.com/818.html#comments</comments>
		<pubDate>Thu, 09 Dec 2010 05:44:55 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCBCD]]></category>
		<category><![CDATA[SCJP 1.5]]></category>
		<category><![CDATA[SCJP 1.6]]></category>
		<category><![CDATA[SCMAD]]></category>
		<category><![CDATA[SCWCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=818</guid>
		<description><![CDATA[Method overloading is a feature that allows a programmer to implement polymorphism in Java. In method overloading, the name of...]]></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%2F818.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2F818.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Method overloading is a feature that allows a programmer to implement polymorphism in Java. In method overloading, the name of the methods are same, but they differ in number or type of parameters passed to them.</p>
<p>When an overloaded method is invoked, java examines the number or type of parameters passed to the method and matches it with actual arguments to decide which method is to be called.</p>
<p>The example below describes an overloaded method named show():</p>
<ol>
<li> int show(int i) {} </li>
<li>void show(String str) {}</li>
</ol>
<p>Here, method name is the same, but the method at (1) has an int parameter, and the method at (2) has a String parameter.</p>
<p>Note: A parameter is the list of variables passed in a method declaration and arguments are the actual values passed to these parameters when the method is called. Arguments must match with the parameters type and order.  </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2F818.html&amp;title=What%20is%20method%20overloading%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/818.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is this keyword?</title>
		<link>http://www.scjp-certification.com/what-is-this-keyword.html</link>
		<comments>http://www.scjp-certification.com/what-is-this-keyword.html#comments</comments>
		<pubDate>Wed, 08 Dec 2010 05:44:15 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCBCD]]></category>
		<category><![CDATA[SCJP 1.5]]></category>
		<category><![CDATA[SCJP 1.6]]></category>
		<category><![CDATA[SCMAD]]></category>
		<category><![CDATA[SCWCD]]></category>
		<category><![CDATA[this keyword]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=816</guid>
		<description><![CDATA[The this keyword refers to the currently executing instance of a class. It is commonly used to access members from...]]></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-this-keyword.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-this-keyword.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The <strong>this</strong> keyword refers to the currently executing instance of a class. It is commonly used to access members from within constructors, instance methods, and instance accessors. However, the static member functions do not have a this pointer. For example:</p>
<p><strong>using System;<br />
public class Students<br />
 {<br />
   public string name;<br />
   public string subcode;<br />
   //Constructor.<br />
   public Students(string name, string subcode)<br />
     {<br />
       //Use of this keyword to qualify members hidden by similar names.<br />
       this.name = name;<br />
       this.subcode = subcode;<br />
     }<br />
 }</strong> </p>
<p>The this keyword is used to pass an object as a parameter to other methods. For example:</p>
<p><strong>Cal_Marks(this);</strong>  </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-this-keyword.html&amp;title=What%20is%20this%20keyword%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-this-keyword.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are the functions of transfer object?</title>
		<link>http://www.scjp-certification.com/what-are-the-functions-of-transfer-object.html</link>
		<comments>http://www.scjp-certification.com/what-are-the-functions-of-transfer-object.html#comments</comments>
		<pubDate>Thu, 02 Dec 2010 08:53:19 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCWCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=860</guid>
		<description><![CDATA[The functions of a Transfer Object are as follows: It reduces network traffic by aggregating fine-grained remote objects and representing...]]></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-are-the-functions-of-transfer-object.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-functions-of-transfer-object.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The functions of a Transfer Object are as follows:
<ol>
<li>It reduces network traffic by aggregating fine-grained remote objects and representing them as a single call. </li>
<li>It reduces coupling between the tiers. </li>
<li>It reduces code duplication. </li>
<li>It carries multiple data elements across a tier. </li>
<li>It is used to transport data from an enterprise bean to its client. </li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-functions-of-transfer-object.html&amp;title=What%20are%20the%20functions%20of%20transfer%20object%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-are-the-functions-of-transfer-object.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are the functions of business delegate?</title>
		<link>http://www.scjp-certification.com/what-are-the-functions-of-business-delegate.html</link>
		<comments>http://www.scjp-certification.com/what-are-the-functions-of-business-delegate.html#comments</comments>
		<pubDate>Wed, 01 Dec 2010 07:56:48 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCWCD]]></category>
		<category><![CDATA[cx-310-083]]></category>
		<category><![CDATA[CX-310-091]]></category>
		<category><![CDATA[oracle certification]]></category>
		<category><![CDATA[ORACLE SCWCD]]></category>
		<category><![CDATA[SCBCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=858</guid>
		<description><![CDATA[The functions of a Business Delegate are as follows: It hides the implementation details of a business service, such as...]]></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-are-the-functions-of-business-delegate.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-functions-of-business-delegate.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The functions of a Business Delegate are as follows:
<ol>
<li>It hides the implementation details of a business service, such as lookup and access mechanisms.</li>
<li>It provides loose coupling between client and system&#8217;s business services. </li>
<li>It provides control and protection for the business service.</li>
<li>It acts as a proxy for the client to implement the remote service&#8217;s interface. </li>
<li>It throws application level exceptions and, if needed, caches results locally.</li>
<li>It receives a request from a controller, translates it, and forwards it to the business service.</li>
<li>It receives a response back from the business service, translates it, and forwards it to the controller.</li>
</ol>
<p><!-- raj: you have not provided the reference below atu: Corrected-->  </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-are-the-functions-of-business-delegate.html&amp;title=What%20are%20the%20functions%20of%20business%20delegate%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-are-the-functions-of-business-delegate.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is an intercepting filter?</title>
		<link>http://www.scjp-certification.com/what-is-an-intercepting-filter.html</link>
		<comments>http://www.scjp-certification.com/what-is-an-intercepting-filter.html#comments</comments>
		<pubDate>Tue, 30 Nov 2010 07:56:08 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCWCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=856</guid>
		<description><![CDATA[An intercepting filter is a pluggable component that is used to modify incoming requests from a client to a servlet...]]></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-an-intercepting-filter.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-is-an-intercepting-filter.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>An intercepting filter is a pluggable component that is used to modify incoming requests from a client to a servlet and send the response back to the client. Many filters can be chained together, so that the output of one filter becomes an input for the next filter. The filter life cycle is controlled by the container. They are added and removed by configuring tags in the deployment descriptor.</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-an-intercepting-filter.html&amp;title=What%20is%20an%20intercepting%20filter%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-an-intercepting-filter.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to define methods with variable argument lists?</title>
		<link>http://www.scjp-certification.com/how-to-define-methods-with-variable-argument-lists.html</link>
		<comments>http://www.scjp-certification.com/how-to-define-methods-with-variable-argument-lists.html#comments</comments>
		<pubDate>Sun, 10 Oct 2010 05:48:11 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCBCD]]></category>
		<category><![CDATA[SCJP 1.5]]></category>
		<category><![CDATA[SCJP 1.6]]></category>
		<category><![CDATA[SCMAD]]></category>
		<category><![CDATA[SWCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=821</guid>
		<description><![CDATA[Java allows a method to take a variable number of arguments. This capability is referred to as var-args, varargs variable...]]></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%2Fhow-to-define-methods-with-variable-argument-lists.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fhow-to-define-methods-with-variable-argument-lists.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Java allows a method to take a variable number of arguments. This capability is referred to as var-args, varargs variable arguments, variable-length argument lists, or variable-arity parameter.</p>
<p>The syntax for using variable argument lists is as follows:</p>
<p>void fun(int&#8230; z){}</p>
<p>The declaration of the varargs follows the type with an ellipse (&#8230;) and then name of the array.  </p>
<p>Limit: A method can have only one varargs, and it must be the last parameter in the method signature. An example of a varargs declaration is as follows: </p>
<p>void fun(int x, char&#8230; y)  </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fhow-to-define-methods-with-variable-argument-lists.html&amp;title=How%20to%20define%20methods%20with%20variable%20argument%20lists%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/how-to-define-methods-with-variable-argument-lists.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are numeric promotions?</title>
		<link>http://www.scjp-certification.com/what-are-numeric-promotions.html</link>
		<comments>http://www.scjp-certification.com/what-are-numeric-promotions.html#comments</comments>
		<pubDate>Thu, 07 Oct 2010 05:37:33 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCBCD]]></category>
		<category><![CDATA[NUmeric Promotions]]></category>
		<category><![CDATA[SCJP 1.5]]></category>
		<category><![CDATA[SCJP 1.6]]></category>
		<category><![CDATA[SCMAD]]></category>
		<category><![CDATA[SCWCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=813</guid>
		<description><![CDATA[Numeric promotions are used to convert the operands in a numeric expression to a common type before an operation is...]]></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-are-numeric-promotions.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-numeric-promotions.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>Numeric promotions are used to convert the operands in a numeric expression to a common type before an operation is performed between the operands. Numeric promotion is a property of the specific definitions of the built-in operations and not a Java language feature. It is applied to the operands of an arithmetic operator. The two types of numeric promotions are as follows: </p>
<ol>
<li>Unary numeric promotion: The unary numeric promotion takes place in accordance with the following rules:</p>
<ol>
<li> If the operand is one of the following types: byte, short, or char, unary numeric promotion promotes it to a value of type int.</li>
<li> Otherwise, no promotion takes place. </li>
</ol>
</li>
<li> Binary numeric promotion: The binary numeric promotion takes place in accordance with the following rules:
<ol>
<li> If one of the two operands in a numeric expression is a primitive type double value, the other is promoted to a double value.</li>
<li> Otherwise, if one of the two operands in a numeric expression is a primitive type float value, the other is promoted to a float value.</li>
<li> Otherwise, if one of the two operands in a numeric expression is a primitive type long value, the other is promoted to a long value.</li>
<li> Otherwise, both operands are promoted to int values.</li>
</ol>
</li>
</ol>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-numeric-promotions.html&amp;title=What%20are%20numeric%20promotions%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-are-numeric-promotions.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is an interface?</title>
		<link>http://www.scjp-certification.com/807.html</link>
		<comments>http://www.scjp-certification.com/807.html#comments</comments>
		<pubDate>Tue, 05 Oct 2010 05:24:27 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCBCD]]></category>
		<category><![CDATA[SCJP 1.5]]></category>
		<category><![CDATA[SCJP 1.6]]></category>
		<category><![CDATA[SCMAD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=807</guid>
		<description><![CDATA[An interface is a reference type that defines a contract. An interface body consists of method declarations and constants. All...]]></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%2F807.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2F807.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>An interface is a reference type that defines a contract. An interface body consists of method declarations and constants. All methods and constants in an interface are public. Interfaces are left completely unimplemented, i.e., no method in the interface is implemented. All methods of an interface are abstract and the method body is absent. A class may access one or more interfaces simultaneously. An interface is defined using the syntax below:</p>
<p><strong>access_modifier interface interface_name extends Super_interfaces{<br />
   return_type method1(parameter_list);<br />
   .<br />
   .<br />
   .<br />
   return_type methodn(parameter_list);<br />
   datatype variable1 = value;<br />
   .<br />
   .<br />
   .<br />
   datatype variablen = value;<br />
}</strong></p>
<p>The syntax defined above has two components: the interface declaration and the body of the interface. They are discussed in the following sections:</p>
<p><strong>An interface declaration</strong></p>
<p>An interface declaration consists of the following components:</p>
<ul>
<li>access_modifier: An interface can be declared by using the public access modifier or without any access modifier. When an interface is declared as public, it can be accessed by any class in any package. If no access modifier is used in the declaration, the interface is accessible only within the package in which it is declared.</li>
<li>interface interface_name: The keyword interface in the declaration tells the compiler that it is an interface declaration, and name of the interface is the one that follows the interface keyword. The name of an interface must be a valid identifier.</li>
<li> extends Super_interfaces: An interface can extend other interfaces in the same way as a class extends another class. The only difference between these two is that whereas a class is allowed to extend only one class, an interface can extend any number of interfaces. The extends keyword in an interface declaration tells the compiler that the interface extends the list of interfaces that follows the extends keyword.</li>
</ul>
<p>The interface body</p>
<p>The interface body contains method declarations for all the methods included in the interface. A method declared within an interface does not have a body, i.e., the method declaration ends with a semicolon. This is because an interface does not provide implementations for the methods declared within it. Apart from method declarations, an interface contains constant declarations. </p>
<p>All the constants defined in an interface are by default static and final. Therefore, there is no need to explicitly use these keywords to declare variables inside the interface body. All methods and variables in an interface are implicitly public if the interface is declared as public. It is also not necessary to declare the methods as abstract as well. The following example demonstrates how to define an interface:</p>
<p><strong>public interface MyInterface{<br />
   void method1();<br />
   int method2(int k);<br />
   int x = 1;<br />
   int y = 2;<br />
}</strong>  </p>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2F807.html&amp;title=What%20is%20an%20interface%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/807.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What are the differences between method overriding and method overloading?</title>
		<link>http://www.scjp-certification.com/what-are-the-differences-between-method-overriding-and-method-overloading-2.html</link>
		<comments>http://www.scjp-certification.com/what-are-the-differences-between-method-overriding-and-method-overloading-2.html#comments</comments>
		<pubDate>Mon, 04 Oct 2010 05:01:51 +0000</pubDate>
		<dc:creator>Daisy Williams</dc:creator>
				<category><![CDATA[Java Facts]]></category>
		<category><![CDATA[SCBCD]]></category>
		<category><![CDATA[SCJP 1.5]]></category>
		<category><![CDATA[SCJP 1.6]]></category>
		<category><![CDATA[SCMAD]]></category>
		<category><![CDATA[SCWCD]]></category>

		<guid isPermaLink="false">http://www.scjp-certification.com/?p=805</guid>
		<description><![CDATA[The following table summarizes the differences between method overriding and method overloading: Method Overriding Method Overloading Arguments of overridden methods...]]></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-are-the-differences-between-method-overriding-and-method-overloading-2.html"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-differences-between-method-overriding-and-method-overloading-2.html&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>The following table summarizes the differences between method overriding and method overloading:</p>
<table border="1">
<tbody>
<tr>
<th>Method Overriding</th>
<th>Method Overloading</th>
</tr>
<tr>
<td>Arguments of overridden methods cannot be changed.</td>
<td>Arguments of overloaded methods can be changed.</td>
</tr>
<tr>
<td>Method return types cannot be changed except covariant return types.</td>
<td>Return types can be changed.</td>
</tr>
<tr>
<td>Exceptions must not throw new or broader checked exceptions.</td>
<td>Exceptions can be changed.</td>
</tr>
<tr>
<td>It happens at runtime.</td>
<td>It happens at compile-time.</td>
</tr>
<tr>
<td>An object type determines which method is selected.</td>
<td>A reference type determines which method is selected.</td>
</tr>
</tbody>
</table>
<p><a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.scjp-certification.com%2Fwhat-are-the-differences-between-method-overriding-and-method-overloading-2.html&amp;title=What%20are%20the%20differences%20between%20method%20overriding%20and%20method%20overloading%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-are-the-differences-between-method-overriding-and-method-overloading-2.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

