DEVFYI - Developer Resource - FYI

What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

Java Interview Questions and Answers (part 2)


(Continued from previous question...)

339. What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

The exception propagates up to the next higher level try-catch statement (if any) or results in the program's termination.

(Continued on next question...)

Other Interview Questions