+ 9

Why Exception Handling is required in Java Programming ??

29th Dec 2016, 6:15 AM
Jenny Lance
Jenny Lance - avatar
11 Answers
+ 5
For a robust program
29th Dec 2016, 9:54 AM
IvĂĄn
IvĂĄn - avatar
+ 4
yes to prevent crashing of whole programme due to some exception
29th Dec 2016, 8:24 AM
auhan
auhan - avatar
+ 3
when you have 1000 or 10,000 line of code and due to some error you can not run the program, so now how can you know that where the error is and the compiler error will be difficult to understand.so by using exception handling you can give the error your personal message that will hint you that this block of code has generated this error.and it's easier to handle the error.
29th Dec 2016, 7:32 AM
Rajveer
+ 2
sometimes you div a zero and you program maybe crash and excepion handeling pervent this is just and example
29th Dec 2016, 8:14 AM
alireza_khavari
alireza_khavari - avatar
+ 2
to avoid possible crash in the execution of your program, wich gonna make it robust to fails
29th Dec 2016, 12:53 PM
Jose Luis Ramirez
Jose Luis Ramirez - avatar
+ 1
your run time error occur program will execute or not
29th Dec 2016, 8:20 AM
prabhakar
+ 1
To handle run time errors in our programms we use exception handeling that actually handle run time errors and provide an solution to it. Solution can be any thing, it can be a message or some thing else.
29th Dec 2016, 10:32 AM
Amit Sharma
Amit Sharma - avatar
+ 1
If the exceptions are not handled correctly, and when an error comes program may shut down, to prevent this you should add exception handling
29th Dec 2016, 12:48 PM
Yasiru Nayanajith
Yasiru Nayanajith - avatar
+ 1
You can also be sure whre the error was actually happened
29th Dec 2016, 2:37 PM
D.M.KEERTHI
D.M.KEERTHI - avatar
+ 1
The name says it all, not just for robust code, this just a way for you to handle error that might occur during your program execution. This will help you handle those conditions without a total failure, for instance you make a network call when your device is in airplane mode, you will get an network error which you can handle by taking care of the network exception, you can do stuff like retry or fail gracefully by displaying a message to the end user
30th Dec 2016, 7:43 PM
joseph odibo
joseph odibo - avatar
0
It so because to prevent your whole programme from being crashed all of a sudden
5th Jan 2017, 2:30 AM
Gaurang Mudgal
Gaurang Mudgal - avatar