Until recently, I had hard time remembering what is the difference between checked and unchecked exceptions.
Finally Head First Java gave me the prompt explanation. Here it goes:
Checked Exceptions: Arise due to the reasons which are beyond control of programmer so complier mandates them to handle or declare.
Unchecked Exceptions: Arises due to logic flaws in the code.So these should be eliminated.Exception Handling mechanism is not supposed to take care of programmer injected logic flaws in the code.So complier wont bother.It is the responsibility of the programmer to eliminate them.
I am also looking for similar kind of prompt and clear explanation for the difference between Error and Exception.If you get to know, I appreciate if you can share with me.
Leave a Reply