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.
exception Handling mechanism is used to execute the program even though errors are existing in it.it also used to show the non technical messages on the screen.these non technical messages are very useful to non technical peoples also
it is like filtering all the errors apart into the section where exception is being implemented and more shortly ,the errors which are existing which are responsible for the program not to be run is put in the exception handling part
Exception causes abnormal termination of currently executing program. so exception handling helps u from abnormal termination of program by handling the exception using the keywords throw,throws,try,catch n finally. By using exception handling we may know what n where is the exception occured.if we know tat the any code in the prgrm may generate exception then put tat block of code in try block n put the code what we have to do if that exception occurs in catch block so that we r providing the solution readily for the exception occured in the prgm itself without terminating the prgm
In java, Exceptional Handling is a very good technique to handle run time errors in the program , we will avoid the abnormal termination of the program and it will help us to display messages for the end-users about the behavior of the program . java provides try catch blocks to handle errors .
Exception handling is used to handle the exceptions ,which are caused abnormal termination of the program, in java we can handle these exceptions by the mechanism called Exception Handling, In Java we can Handle the exceptions by the following keywords try catch throw throws finally
Exception Handling is a power full machenism introduced by java to handle the exception which occured during run time.for the handling exception java provides programmers to five keyword like throw,throws,try,catch and finally.An exception can handle by java run-time interpreator as well as A programmer.if a java run-time Interpreater handles An exception then it throw only a particular massage regarding of that Exception.but if a programmer handles the exception then they can throw message regarding that exception as well as they can continue that program after catching that particular exception.
Exception is Obnormal situation or unexcepected situation in the normal exution flow will be disturbed.A run time error which is possible to handle called Exception Because of the exception normal execution of the program will be terminated but we handle the programme and continue the next portion of the programme is called as Exception Handling
Exception indecates the abnormal behaviour of a program, it can happen because of invalid data or because of wrong logic in the program. To indecate this unwanted situation to the user java developer can throw exceptions and handle them properly and display the non technical message to end user.
Exception handling in Java is both throwing and catching/handling the exceptions. Exceptions can be user defined exceptions or exception classes provided by Java.