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. The “catch or declare” rule is associated with checked exceptions in Java. According to this rule, if a method may throw a checked exception, the method must either … Read more