Exception Handling: An exception/error is an abnormal condition that breaks/disrupts the normal program flow. The abnormal condition occurs at run-time i.e. during code execution. For example, a C program gets terminated when division by zero is encountered at the run-time as this is not a defined operation and result in run-time error. The other familiar example in case of C-language is that of null pointer exception, which occurs when we try to access a memory location through an un-initialized pointer. The program gets terminated in this case also. Java has a separate construct for exception/error handling like C++. It is possible to recover from an exception/error at run-time and continue the program exception using the exception-handling construct. A java exception/error is an object of class Exception/Error or one of its sub-class. JVM creates an object of class Exception/Error or one o f their sub-class whenever e...
FOR EVERY PROGRAMMER SOME SPECIAL PROGRAMS WITH THEORY.