Here is the answer.
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.
This rule is actually for handling the exceptions: that is there are two ways by which we can handle the exception :
1: either you use the try catch statement and enclose the appropriate code in the try catch block this is called as the catch or the handle rule.
2: you can also use the throw and throws statement instead of using the try catch block i.e you should specify the exceptions that your method is capable of throwing(only checked).
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.