In Java in a Nutshell, it says that we must declare the checked exceptions that a method can throw, by throws
.
I was wondering if we must declare any unchecked exception that a method can throw, by throws
or other ways?
Does the answer depend on whether the unchecked exception is predefined or self-defined?
Thanks.