i have confusion about exception and error.suppose if u make a software so u must b having Exception handling in that.so wat ab errors?can they b handled like exceptions? if yes then what is the differece between both of these?
In a perfect world, and in a nutshell... Errors represent problems that aren't typically handled by a program. They represent severely bad situations that should not occur, and that a programmer should not try to recover from. Sometimes errors occur because of (external) conditions that cannot be controlled or effected by the running Java program. Exceptions come in too basic forms: Runtime Exceptions (aka Unchecked Exceptions) and Checked Exceptions. Runtime Exceptions typically are not meant to be handled by a program. They often represent programmer errors, that should reveal themselves at run time and that should be fixed by the programmer correcting the code problem. Checked Exceptions typically represent problem conditions outside of a program's control, but should be recovered from by the program. For more information, a good place to learn lots of different and good ideas on exceptions in Java is at http://c2.com/cgi/wiki?JavaExceptionHandling Does that help?
Thanks for that link - some solid discussion about exception issues. This is a controversial area and I was surprised to see almost nothing newer than 2000, tho. Did anybody see the Throws Excepiton By Default page? I think I'm for it. I've been doing a lot of stuff that reads streams lately, and letting any exceptions percolate quite a way up the stack to a higher level class for any handling.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi