News

The reason this can become a nuisance is that some methods in Java will actually force the user to handle exceptions. This is where “try catch” in Java comes into play.
Thus, making an exception checked forces the programmer to pay heed to the possibility of it being thrown. An example of a checked exception is java.io.IOException.
Java developers learn to rely on their compilers to catch assignments to incorrect types, calls of nonexistent methods and—this article's topic—incorrect exception handling.