Posts

Showing posts with the label exception handling

EXCEPTION HANDLING IN JAVA

Image
Exception Handling (JAVA)  An exception is an abnormal condition that arises at run-time. So, we can consider it as a run-time error. Java's exception handling helps in bringing run-time error management into the real world of object oriented programming. Basics of Exception Handling A Java exception is an object that describes the error condition. When an exceptional condition arises, then the object representing the exception is created and thrown in the method that caused the error. That method can either choose to handle the exception by itself or pass it. In anyway, the exception is caught and processed. Exceptions are either generated by JAVA Run-time system or manually by the code.  Five keywords in Java's Exception Handling try catch throw throws finally    General form of exception handling:   try{     //Your code goes here } catch(ExceptionType1){     //exception handler for exception type 1 } catch(ExceptionType2){ ...