<?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>Rocking Team &#187; Built-in Exceptions</title>
	<atom:link href="http://www.rockingteam.com/tag/built-in-exceptions/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.rockingteam.com</link>
	<description>Technology @ Your Finger Tips... Computer, Web, Gadget, Mobile, Automobile, Movie Releated News Articles..</description>
	<lastBuildDate>Sun, 05 Feb 2012 17:28:18 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Java Tutorial : Exception-Handling &#8211; Summary</title>
		<link>http://www.rockingteam.com/2009/11/java-tutorial-exception-handling-summary/</link>
		<comments>http://www.rockingteam.com/2009/11/java-tutorial-exception-handling-summary/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 06:41:29 +0000</pubDate>
		<dc:creator>Alex Jose</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Assertion In Java]]></category>
		<category><![CDATA[Built-in Exceptions]]></category>
		<category><![CDATA[Exception Classes]]></category>
		<category><![CDATA[Exception Handling]]></category>
		<category><![CDATA[Implenting Exception Handling]]></category>
		<category><![CDATA[Thrwing An Exception]]></category>
		<category><![CDATA[User Defined Exception]]></category>

		<guid isPermaLink="false">http://www.rockingteam.com/?p=2683</guid>
		<description><![CDATA[Errors can be broadly categorized into two groups on the basis of whether the compiler is able to handle the error or not, such as compile time errors and runtime errors. An exception is a run-time error that can be defined as an abnormal event that occurs during the execution of a program and disrupts [...]]]></description>
			<content:encoded><![CDATA[<ul>
<li>Errors can be broadly categorized into two groups on the basis of whether the compiler is able to handle the error or not, such as compile time errors and runtime errors.</li>
<li>An exception is a run-time error that can be defined as an abnormal event that occurs during the execution of a program and disrupts the normal flow of instructions.</li>
<li>In Java, the Throwable class is the superclassof all the exception classes. It is the class at the top position in the exception class hierarchy. The Exception class and the Error class are two direct subclasses of the Throwable class.</li>
<li>The built-in exceptions in Java are divided into two types on the basis of the conditions where the exception is raised:
<ul>
<li>Checked Exceptions or Compiler-enforced Exceptions</li>
<li>Unchecked exceptions or Runtime Exceptions</li>
</ul>
</li>
<li>You can implement exception-handling in your program by using the following keywords:
<ul>
<li>try</li>
<li>catch</li>
<li>throw</li>
<li>throws</li>
<li>finally</li>
</ul>
</li>
<li>You use multiple catch blocks to throw more than one type of exception.</li>
<li>The finally clause is used to execute the statements that need to be executed whether or not an exception has been thrown.</li>
<li>The throw statement causes termination of the normal flow of control of the</li>
<li>Java code and stops the execution of subsequent statements after the throw statement.</li>
<li>The throws clause is used by a method to specify the types of exceptions the method throws.</li>
<li>You can create your own exception classes to handle the situations specific to an application.</li>
<li>You can use assertions to check and ensure that any assumption made at the start of a program is true throughout the program.</li>
</ul>
<h2>Exception-Handling related Tutorial Article</h2>
<ol>
<li><a title="Java Tutorial : Exception Handling" href="http://www.rockingteam.com/2009/09/java-tutorial-exception-handling/">Java Tutorial : Exception Handling</a></li>
<li><a title="Java Tutorial : Exception Classes" href="http://www.rockingteam.com/2009/10/java-tutorial-exception-classes/">Java Tutorial : Exception Classes</a></li>
<li><a title="Java Tutorial : Built-in Exceptions" href="http://www.rockingteam.com/2009/10/java-tutorial-built-in-exceptions/">Java Tutorial : Built-in Exceptions</a></li>
<li><a title="Java Tutorial : Implementing Exception Handling" href="http://www.rockingteam.com/2009/10/java-tutorial-built-in-exceptions/">Java Tutorial : Implementing Exception Handling</a></li>
<li><a title="Java Tutorial : Implementing Exception Handling – Part 2" href="http://www.rockingteam.com/2009/10/java-tutorial-implementing-exception-handling-part-2/">Java Tutorial : Implementing Exception Handling – Part 2</a></li>
<li><a title=" 	Java Tutorial : Throwing An Exception – Part 1" href="http://www.rockingteam.com/2009/10/java-tutorial-throwing-an-exception-part-1/">Java Tutorial : Throwing An Exception – Part 1</a></li>
<li><a title="Java Tutorial : Throwing An Exception – Part 2" href="http://www.rockingteam.com/2009/10/java-tutorial-throwing-an-exception-%e2%80%93-part-2/">Java Tutorial : Throwing An Exception – Part 2</a></li>
<li><a title="Implementing User Defined Exceptions" href="http://www.rockingteam.com/2009/11/implementing-user-defined-exceptions/">Implementing User Defined Exceptions</a></li>
<li><a title="Java Tutorial : Assertion In Java" href="http://www.rockingteam.com/2009/11/java-tutorial-assertion-in-java/">Java Tutorial : Assertion In Java</a></li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.rockingteam.com/2009/11/java-tutorial-exception-handling-summary/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Tutorial : Built-in Exceptions</title>
		<link>http://www.rockingteam.com/2009/10/java-tutorial-built-in-exceptions/</link>
		<comments>http://www.rockingteam.com/2009/10/java-tutorial-built-in-exceptions/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 18:14:58 +0000</pubDate>
		<dc:creator>Alex Jose</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Built-in Exceptions]]></category>
		<category><![CDATA[Exception Handling]]></category>
		<category><![CDATA[Java Tutorial]]></category>

		<guid isPermaLink="false">http://www.rockingteam.com/2009/10/built-in-exceptions/</guid>
		<description><![CDATA[The built-in exceptions in Java are categorized on the basis of whether the exception is handled by the Java compiler or not. Java consists of the following categories of built-in exceptions: Checked Exceptions Unchecked Exceptions Checked Exceptions Checked exceptions are the objects of the Exception class or any of its subclasses excluding the Runtime Exception [...]]]></description>
			<content:encoded><![CDATA[<p>The built-in <a href="http://www.rockingteam.com/2009/09/java-tutorial-exception-handling/">exceptions in Java</a> are categorized on the basis of whether the exception is handled by the Java compiler or not. Java consists of the following categories of built-in exceptions:</p>
<ul>
<li>Checked Exceptions </li>
<li>Unchecked Exceptions </li>
</ul>
<h4>Checked Exceptions</h4>
<p>Checked exceptions are the objects of the <strong><em>Exception</em></strong> class or any of its subclasses excluding the <strong><em>Runtime</em></strong> Exception class. Checked exceptions are the invalid conditions that occur in a Java program due to invalid user input, network connectivity problem, or database problems. For example, <strong><em>java.io.IOException</em></strong> is a checked exception. The <strong><em>IOException</em></strong> exception is thrown whenever an input/output operation is abnormally terminated.</p>
<p>Java uses the try-catch block to handle the checked exceptions. The statements within a program that throw an exception are placed in the try block. You associate an exception-handler with the try block by providing one or more catch handlers immediately after the try block.</p>
<p>The following table lists the various checked exceptions defined in the java.lang package:</p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="300">
<p align="center"><strong>Exception</strong></p>
</td>
<td valign="top" width="300">
<p align="center"><strong>Cause of Creation</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="300">ClassNotFoundException</td>
<td valign="top" width="300">
<p>Occurs when the Java run-time            <br />system is unable to find the class             <br />referred.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">IllegalAccessException</td>
<td valign="top" width="300">
<p>Occurs when you want to refer a            <br />class that is not accessible.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">InstantiationException</td>
<td valign="top" width="300">
<p>Occurs when you try to create an            <br />object of an abstract class or             <br />interface.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">NoSuchMethodException</td>
<td valign="top" width="300">
<p>Occurs when you call a method that            <br />does not exist.</p>
</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<h2>Unchecked Exceptions</h2>
<p>Unchecked exceptions are the run-time errors that occur because of programming errors, such as invalid arguments passed to a public method. The Java compiler does not check the unchecked exceptions during program compilation. For example, if you divide a number by zero, an unchecked or run-time exception is raised.</p>
<p>The following table lists the various unchecked exceptions:</p>
<table border="0" cellspacing="0" cellpadding="2" width="600">
<tbody>
<tr>
<td valign="top" width="300">
<p align="center"><strong>Exception</strong></p>
</td>
<td valign="top" width="300">
<p align="center"><strong>Cause of Creation</strong></p>
</td>
</tr>
<tr>
<td valign="top" width="300">ArithmeticException</td>
<td valign="top" width="300">
<p>Occurs when you make an           <br />arithmetic error, such as dividing a            <br />number by zero.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">ArrayIndexOutOfBoundsException</td>
<td valign="top" width="300">
<p>Occurs when an attempt is made           <br />to access an array element beyond            <br />the index of the array.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">ArrayStoreException</td>
<td valign="top" width="300">
<p>Occurs when you assign an           <br />element to an array that is not            <br />compatible with the data type of            <br />that array.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">ClassCastException</td>
<td valign="top" width="300">
<p>Occurs when you assign a           <br />reference variable of a class to an            <br />incompatible reference variable of            <br />another class.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">IllegalArgumentException</td>
<td valign="top" width="300">
<p>Occurs when you pass an           <br />argument of incompatible data            <br />type to a method.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">NegativeArraySizeException</td>
<td valign="top" width="300">
<p>Occurs when you create an array           <br />with negative size.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">NullPointerException</td>
<td valign="top" width="300">
<p>Occurs when an application tries to           <br />use an object without allocating            <br />memory to it or calls a method of            <br />a null object.</p>
</td>
</tr>
<tr>
<td valign="top" width="300">NumberFormatException</td>
<td valign="top" width="300">
<p>Occurs when you want to convert           <br />a string in an incorrect format to a            <br />numeric format.</p>
</td>
</tr>
</tbody>
</table>
]]></content:encoded>
			<wfw:commentRss>http://www.rockingteam.com/2009/10/java-tutorial-built-in-exceptions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

