201k views
1 vote
An exception thrown from outside a try block:_________. a. will cause the program to terminate execution b. will be caught outside the catch block c. will be caught inside the catch block d. will remain inside the throw block None of these

User Sleepyup
by
4.9k points

1 Answer

10 votes
Answer: A, It will cause the program to terminate execution.

Explanation: If an exception is thrown **inside** of a try block then it will be caught inside of the catch block but in this instance it’s asking what happens if the exception is thrown on the **outside** the try block so because the error cannot be caught in the catch block it leads to the program terminating.
User Azazul
by
5.4k points