In Java (or any other language with checked exceptions), when creating your own exception class, how do you decide whether it should be checked or unchecked?
My inst
Checked Exception: If client can recover from an exception and would like to continue, use checked exception.
Unchecked Exception: If a client can't do any thing after the exception, then raise unchecked exception.
Example: If you are expected to do arithmetic operation in a method A() and based on the output from A(), you have to another operation. If the output is null from method A() which you are not expecting during the run time, then you are expected to throw Null pointer Exception which is Run time exception.
Refer here