OOPs Concepts
Programming and Technical
What are the different ways to handle exceptions?
Read Solution (Total 3)
-
- 2 ways:-
1. By wrapping the desired code in a try block followed by a catch block to catch the exceptions.
2. List the desired exceptions in the throws clause of the method and let the caller of the method handle those exceptions. - 10 years agoHelpfull: Yes(1) No(0)
- by using try,catch,finally is one way to handle an exception
- 10 years agoHelpfull: Yes(0) No(0)
- try-catch
try-finally
try-catch-finally
throws keyword
throw keyword - 9 years agoHelpfull: Yes(0) No(0)
OOPs Concepts Other Question