• Dear Guest, Please do NOT forget to join our JAVA JOBS (ONLY) FACEBOOK GROUP to be aware of latest JAVA openings, and you may also post any JAVA related queries/jobs.

What is an Exception ?

An Exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. it's a Runtime Error.
  1. An Exception is an EVENT. it will disturb the normal flow of the program execution.
  2. When ever an exception will rised the programmer resposibility to handle and provide grace full termination of the program.
  3. This exception are two types:
  4. 1.Checked(Compile time) exceptions
  5. 2. Unchecked(Run time(JVM)) Exceptions
An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions.
"Throwable", the parent class of all exception related classes.
We can handle this Exceptions by using Try,catch and finally blocks.
Exception handling provides the following advantages over "traditional" error management techniques:
Separating Error Handling Code from "Regular" Code.
Propagating Errors up the Call Stack.
Grouping Error Types and Error Differentiation.
java.lang.Exception is Object that is thrown when an abnormal event occurs in the flow of program execution,which should be properly handled else causes abnormal termination of the program
an exception is a method for handling the runtime error. exception help to avoid the abnormal termination of program eg. divide by 0 is a ArithmaticException in java.
strictly speaking..Exception is an object that occurs at the runtime and terminates the program abnormally if not caught and handled....this abnormal termination may lead to user's inconvenience..hence exceptions are handled using try and catch blocks
Exception is an abnormal condition raised my Jvm.During the Program execution exception are raised.when ever Exception is raised we can Handle by using try/catch blocks..


New Member
which stops the smooth flow of prg is know as exception...mainly exceptions are classified into two types or (exceptions are of two types) run time exception n compile time exception.

to avoid exception we have to use try catch blocks or we can throw Exception where ever we get it :)

hope this explanation is enough for exception