Ads Sponsored By Google :)

Monday 28 January 2013

different|list|types|kind of exceptions checked|and|unchecked in java with example|tutorial|hierarchy exception handling compile time|runtime user defined|custom defined


exceptions in java checked and unchecked exceptions in java different types of exceptions in java types of exceptions in java exceptions in java example exceptions in java tutorial exceptions in java example code exceptions in java example program userdefined exception in java list of exceptions in java runtime exceptions in java checked exceptions in java unchecked exceptions in java user defined exceptions in java custom exceptions in java list of checked exceptions in java list pf runtime exceptions list of compile time exceptions handling exceptions in java examples of checked and unchecked exceptions in java creating exceptions in java different types of exceptions in java different kinds of exceptions in java checked exceptions examples in java throwing exceptions in java java built in exceptions common exceptions in java
checked exceptions in java example exception handling in java with example programs checked exceptions in java tutorial exceptions handling in java hierarchy of exceptions in java

Exceptions in java:

     In Any Programming Language if We write any program then we get three types of errors
They are

1) Compile Time Errors
2) Logical Errors
3) Run time Errors

1)   Compile Time Errors:

    Compile time errors are those which are occurred at compilation time . Because the programmer may not following proper syntax or may not following proper grammar of the language.

2)   Logical Errors:

         Logical Errors are those which are resulted during execution time of the program. Because of misinterpretation of logic of the program Because of logical errors we get inconsistent /wrong
results.

3)   RunTimeErrors:

        Run time Errors will be occurred only when application user enter invalid input during execution of the program.

Definition of Exception:

                Runtime Errors of the Programs are also known as Exception. In Any programming language , if we write a program and if application user enters invalid input then the execution environment will generate run time errors

Exception Handling:

          In any software development, it is highly recommended to convert System Error  
    Messages into User Friendly Messages is known as Exception Handling.

  In Java Programming we have two types of Exceptions.They are

   1) Predefined Exceptions.
   2) User Defined Exceptions.

1)     Predefined Exceptions:

                    Predefined Exceptions are those Which are given by sun micro systems and it part of JDK used to deal with Universal Problems.

Example:-

        1)Division By Zero
        2)Invalid Number Format etc……..

Predefined Exception Are of Two Types .They Are

a)     Asynchronous Exception:

                        Asynchronous Exception are those which are always dealing with hard ware 
             problems and External Problems

   Ex:- Memory Problems
           Mouse Failures

                API For this Exception would be come in future. As on today Asynchronous Exception   
      is Under Research And Development of Sun Micro Systems.Right Now Sun Micro Systems 
     developed A Base class called JAVA.LANG.ERROR

b)     Synchronous Exception:

                  Synchronous Exception are those which are always deals with Programmatic  
         run time Errors. Again Synchronous Exception Can be Classified into Two Types
   
            They are:
               a) Checked Exception.
               b) Unchecked Exception.

         Hierarchy Of Exceptions:

Hierarchy of exceptions

            

a)     Checked Exception:
                         
                  Checked Exception are those which are sub classes of the  JAVA.LANG.EXCEPTION

b)     Un-Checked Exception:
          
          Unchecked Exceptions are those which are sub classes of JAVA.LANG.RUNTIME Exception

     Exception Handling Hierarchy Chart:


List of Exceptions

No comments:

Post a Comment

LinkWithin