In Java, can a method declare "throws" for a checked exception that is not thrown in the method body?
A. Only if the exceptions are marked as "final"
B. Only if the method is marked as "static"
C. Yes, a method can declare "throws" for checked exceptions that are not thrown in the method body
D. No, a method must throw all the exceptions it declares
Answer: Option C

Join The Discussion