Checked Exception represent conditions that, although exceptional, can reasonably be expected to occur. Making this exception checked, documents the existence of the exception and ensures that the caller of a method deals with the exception in some way.
Unchecked Exception represent conditions that, generally speaking, reflect errors in your program logic and cannot be reasonably recovered from at run time. for example, the ArithemeticException thrown when you devided a number with integer zero, tells you that your program calculated incorrectly. These are error should be corrected in the program code.
hope that helps stevie
Joined: Nov 01, 2000
So, Stevie, I need not handle this type of runtime errors. Am i right?
Joined: Feb 04, 2001
RuntimeException and Error are the only exceptions you do not need to list in your throws clauses. They are ubiquitous, and every method can potentially throw them. This is why they are unchecked by the compiler. Note : The contract defined by throws clause is strictly enforced, you can throw a type of checked exception that has been declared in the throws clause. Throwing any other type of checked exception is invalid. If a method has no throws clause, it does not mean that any exception can be thrown, it means No checked exceptions can be throw. regard's stevie
hi, Unchecked Exceptions:ArithmeticException,NumberFormatException,NullPointerException checked exceptions: IOException,FileNotFoundException,MalformedURLException,InterruptedException(most common exceptions) jeena jose