| Share this post! | Vote this! |
|
What is an Exception?
Some Exceptional event or error that occurs during runtime. It causes normal program flow to be disrupted. For example, divide by zero is an exception. Some other common exceptions are accessing the elements of an array beyond its range, invalid input, hard disk crash, opening a non-existent file, heap memory exhausted.An exception in Java is an object that is created when an abnormal situation arises in your program. This object has members that stores information about the nature of the problem. An Exception is always an object of some subclass of the standard class Throwable. Java provides a very well defined hierarchy of Exceptions to deal with situations which are unusual. All Standard exceptions are covered by two direct subclasses of the class Throwable: more...




0 comments:
Post a Comment