What is exception handling? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is exception handling?

15th Aug 2017, 6:48 AM
Nithin S
Nithin S - avatar
2 Answers
+ 2
Think of exception handling as error handling. If an error occurs, you need to deal or 'handle' it otherwise your program will crash. @corejava 1/0 is NOT infinity. (Mathematically) The reason it would show Infinity for floating point numbers could be due to rounding errors or since 0 has a positive sign (In regards to its bits)
15th Aug 2017, 2:24 PM
Rrestoring faith
Rrestoring faith - avatar
+ 1
eg in program if u divide 1/0 it shows error coz it's answer is infinity it will not show u infinity on this case we have to use exception handling they r generally try catch throws finally
15th Aug 2017, 12:46 PM
corejava