|
Is an A good answer might be:No. |
Example Program
Here is an example program. Notice that
The clause "throws ArithmeticException" in the header of main() calls MethodA MethodA calls MethodB MethodB causes an ArithmeticException by dividing by zero MethodB throws the exception back to MethodA MethodA catches the exception and prints "Division by zero!!" Control returns to main() (which does nothing.) Of course, this program is no exception: you should copy it to notepad, save it to a file, compile and run it. Exception handling can be tricky, and a little practice now will help you later. |
QUESTION 9:Now say that the user enters the string "Rats". What happens now? Click Here after you have answered the questionmain() calls MethodA ___________________________________ ___________________________________ ___________________________________ ___________________________________ Control returns to main(). |