27-10-2012, 04:30 PM
ERROR MANAGAMENT AND EXCEPTION HANDLING IN JAVA
ERROR MANAGAMENT.pptx (Size: 81.25 KB / Downloads: 24)
Introduction
It is common to make mistakes while developing as well as typing a program .
A mistake might lead to an error causing to program to produce unexpected result
Compile – time errors
All syntax errors will be detected and displayed by the compile and therefore these error are know as compile time errors
missing semicolons
missing and mismatch of brackets in classes and methods
bad reference to objects
Run – Time Errors
Sometimes a program may compile success fully creating the class file but not produce correct output because of wrong logic
Dividing an a integer by zero
Attempting to use a negative size for an array
converting invalid strong to a number
Exceptions:
An exception is a condition that is caused by a run – time error in the program; an exception is an event , which occurs during the execution of a program that disturb the normal flow of the program’s instruction.
Exception handling:
It is a programming language construct or computer hardware process to designed to handle the occurrences of exception , special conditions that change the normal flow of program execution