Search Techno Talk

Exception handling overview in Java

Posted 9:18 AM by Sobia in Labels:
An exception is an abnormal condition that disrupts normal program flow. There are many cases where abnormal conditions happen during program execution, such as the following:
  1. The file you try to open may not exist.
  2. The class file you want to load may be missing or in the wrong format.
  3. The other end of your network connection may be disrupted for some mysterious reason.
  4. An operand is not in the legal range prescribed for operations or methods.

If these abnormal conditions are not prevented or at least handled properly, either the program will be aborted abruptly or the incorrect results or status will be carried on, causing more and more abnormal conditions. Imagine a program that reads from an unopened file and does computations based on those input values.



0 comment(s) to... “Exception handling overview in Java”

0 comments:

Post a Comment

Google Groups
Subscribe to Techno Talk
Email:
Visit this group