DEVFYI - Developer Resource - FYI

What is the catch or declare rule for method declarations?

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

547. What is the catch or declare rule for method declarations?

If a checked exception may be thrown within the body of a method, the method must either catch the exception or declare it in its throws clause.

(Continued on next question...)

Other Interview Questions