Item 70 @ Effective Java by Joshua Bloch,
"Use checked exceptions for recoverable conditions and run-time exceptions for
programming errors."
Checked Exceptions
Exceptions that are evaluated at compile time. The simple rule of thumb is, if a method code is referring an another code that throws an exception, either it should handle it using Try/ Catch block or throw it.
Unchecked Exceptions
Unchecked exceptions are the exceptions that are not evaluated at compile time. It means it is not enforced to handle them.
"Use checked exceptions for recoverable conditions and run-time exceptions for
programming errors."
No comments:
Post a Comment