Exceptions are difficult to handle. Java Exceptions aren’t different.
Elliotte Rusty Harold tries to remove the confusion.
Perhaps the continuing confusion over the difference between checked and runtime exceptions in Java is because we haven’t named them properly. Mosts texts and teachers, including myself, have traditionally focused on how and when you handle the exceptions (compile time or runtime) rather than on what causes each. I propose a modification, not in code, but in terminology and teaching. Specifically I think we should should start calling checked exceptions “external exceptions” and runtime exceptions “internal exceptions”.
After some examples and explanations he concludes
If the exception is caused by problems internal to the program, it’s a runtime exception. If it’s caused by problems external to the program, it’s a checked exception.
Source: The Cafes
Tags: exceptions, java, programming, Technology
July 14, 2008 at 9:59 pm |
read this http://dev2dev.bea.com/pub/a/2006/11/effective-exceptions.html