+ 9
Why Exception Handling is required in Java Programming ??
11 Antworten
+ 5
For a robust program
+ 4
yes to prevent crashing of whole programme due to some exception
+ 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.
+ 2
sometimes you div a zero and you program maybe crash and excepion handeling pervent this
is just and example
+ 2
to avoid possible crash in the execution of your program, wich gonna make it robust to fails
+ 1
your run time error occur program will execute or not
+ 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.
+ 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
+ 1
You can also be sure whre the error was actually happened
+ 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
0
It so because to prevent your whole programme from being crashed all of a sudden