Concentrate on the Java Exceptions that Matter to Your Application
Using custom exceptions that separate application from system exceptions enables you to concentrate on handling only the exceptions that are meaningful to your application.
by Tareq Shaheen
September 14, 2005
xceptions, indicators of abnormal conditions that disrupt the normal flow of a program, are a prominent fixture of the Java language. You have to handle exceptions to write a useful Java program.
Java classifies exceptions as either checked or unchecked and, as with everything else, represents them as objects. Checked exceptions extend java.lang.Exception, and they must be handled by a try/catch block or a throws clause for compilation to proceed. Unchecked exceptions extend java.lang.RuntimeException, and they are not checked by the compiler.
It's quick, easy and you get access to all the articles on DevX.
This registration/login is to allow you to read articles on devx.com. Already a member?
To become a member of DevX.com create your Member Profile by completing the form below. Membership is free!