Question: Which of the following statements are true? Select the two correct answers. (a) If an exception is not caught in a method, the method will
Which of the following statements are true?
Select the two correct answers.
(a) If an exception is not caught in a method, the method will terminate and normal execution will resume.
(b) An overriding method must declare that it throws the same exception classes as the method it overrides.
(c) The main() method of a program can declare that it throws checked exceptions.
(d) A method declaring that it throws an exception of a certain class may throw instances of any subclass of that exception class.
(e) finally clauses are executed if, and only if, an exception gets thrown while inside the corresponding try block.
Step by Step Solution
3.38 Rating (160 Votes )
There are 3 Steps involved in it
c and d Normal execution will resume only if the exception is caught by the method The uncaugh... View full answer
Get step-by-step solutions from verified subject matter experts
