What is Exception Handling In java? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

What is Exception Handling In java?

30th Apr 2017, 11:25 AM
vismay thakkar
vismay thakkar - avatar
3 Answers
+ 19
To handle the errors in the code... for example, when we divide by 0... called an ArithmeticException.
30th Apr 2017, 11:31 AM
Dev
Dev - avatar
+ 12
When there is an exceptional condition, an exception object is created. Then there will be looked for an appropiate block of code that can catch this exception object = exception handler. If found the instructions inside the exceptionhandler will be executed and program continues. If not found then execution of the program is halted.
7th May 2017, 8:05 AM
NimWing Yuan
NimWing Yuan - avatar
+ 7
Do specific stuff when a code errors, so when it is handled, no error will occur and the code will still compile, I would reccomend you to use it.
30th Apr 2017, 12:06 PM
Complex
Complex - avatar