Question: Java Briefly describe what happens when we throw within a method. In order to handle exceptions, we need try, catch, and, possibly, finally blocks. Explain
Java
Briefly describe what happens when we throw within a method. In order to handle exceptions, we need try, catch, and, possibly, finally blocks. Explain briefly what each of these does. What code should appear in a try block? Why might we have multiple catch blocks after a single try? Why might we want to re-throw exceptions, rather than processing them ourselves? What happens if all methods just re-throw exceptions rather than handling them
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
