A method declares throws FileNotFoundException and SQLException. Which statement about the caller is true?
Each checked exception must be handled or declared.
Why this answer
Option C is correct because in Java, when a method declares checked exceptions (like FileNotFoundException and SQLException) in its throws clause, any caller must either handle each checked exception with a try-catch block or declare them in its own throws clause. The compiler enforces this rule to ensure that checked exceptions are properly accounted for, preventing unhandled checked exceptions from propagating unchecked.
Exam trap
The trap here is that candidates often think they can choose to handle only one exception or ignore checked exceptions entirely, forgetting that Java's checked exception mechanism requires every declared checked exception to be either caught or re-declared by the caller.
How to eliminate wrong answers
Option A is wrong because the caller cannot catch only FileNotFoundException; it must handle or declare both checked exceptions (FileNotFoundException and SQLException) as they are both declared in the method's throws clause. Option B is wrong because while the caller can declare throws Exception to cover both, this is not the only option; the caller could also handle them individually with catch blocks, and the statement 'can declare throws Exception' is true but does not represent the mandatory requirement that the caller must handle or declare both. Option D is wrong because ignoring both exceptions is not allowed; the Java compiler will produce a compilation error if the caller does not handle or declare the checked exceptions.