Q.

What happens in a method if there is an exception thrown in a try block but there is no catch block following the try block?

A. The program ignores the exception.
B. The program will not compile without a complete try/catch structure.
C. The program terminates immediately.
D. The program throws an exception and proceeds to execute the finally block.
Answer» D. The program throws an exception and proceeds to execute the finally block.
3.6k
0
Do you find this helpful?
26

View all MCQs in

Java Programming

Discussion

No comments yet