Making an exception checked forces client programmers to deal with the possibility that the exception will be thrown. e.g., IOException
Unchecked exceptions are Runtime Exception. With an unchecked exception, however, the compiler doesn't force programmers to catch the exception or declare it in a throws clause. In fact, programmers may not even know that the exception could be thrown. E.g. StringIndexOutOfBoundsException.
No comments:
Post a Comment