+ 4

how to handle unchecked exception ?

2nd Jul 2016, 7:50 AM
Tarun Kumar Verma
Tarun Kumar Verma - avatar
4 ответов
+ 1
unchecked exceptions are nothing but run time errors.dividing a no. by 0, finding a squareroot of a -ve no. so to handle these exceptions put the program segment in try catch block.
4th Jul 2016, 2:29 PM
Himanshu Gangwar
Himanshu Gangwar - avatar
0
On ur way
3rd Jul 2016, 8:46 AM
shubhu
0
always try to write ur code within try and catch block so that exception cannot interrupt your flow of process
11th Jul 2016, 9:37 AM
vijay negi
vijay negi - avatar
0
use this as the last catch block: catch(Exception ex) { } This will catch all the exceptions. Make sure you put this block as the last one or this block will be executed before the one you have specified (if any).
17th Jul 2016, 1:53 PM
Vibhu Agarwal
Vibhu Agarwal - avatar