05-11-2017, 04:19 PM
The two methods to handle exception are as follows:-
Wrapping the desired code in the try block that is followed by catch block
List out the desired exception in throw and the caller of the method handle
the exception
Wrapping the desired code in the try block that is followed by catch block
List out the desired exception in throw and the caller of the method handle
the exception