0

Why we use exception in cpp and java?

20th Aug 2017, 1:57 PM
MANOJ KUMAR
MANOJ KUMAR - avatar
4 Answers
+ 3
Sometimes errors can occur like when a program converts a String to an Integer (Word to a Number) if the String is "1" it can be translated to 1 but if String is "Apple" it cannot be converted to a number, thus it would throw an Exception (error) So we use try and catch to monitor that everything is working how it should.
20th Aug 2017, 2:09 PM
Limitless
Limitless - avatar
+ 2
Monads?
20th Aug 2017, 6:11 PM
Limitless
Limitless - avatar
0
Good question. Monads are much more useful.
20th Aug 2017, 5:49 PM
1of3
1of3 - avatar
0
what is monads guys?
21st Aug 2017, 2:09 AM
MANOJ KUMAR
MANOJ KUMAR - avatar