What is an exception?
Are you preparing for IT certification? With practice questions, study notes, interactive quizzes, tips and technical articles, uCertify PrepKits ensure that you get a solid grasp of core technical concepts to ace your certification exam in first attempt.
What is an exception?
Rating:
An exception is an abnormal event that occurs during the execution of a program. It describes an error occurred at runtime. This error disrupts the normal flow of instructions in the program.
In Java, exceptions are represented using objects. When an exceptional condition arises within a method, an exception object is created and thrown in the method. The exception object contains information about the exception. This information includes the exception type and the state of the program when the error occurred. Exceptions can be generated by the Java runtime system, or they can be generated manually by a code.
Rating:
Was this information helpful?
Other articles
- What is a for-each loop?
- What is the getTimeout() method?
- What is the Gauge class?
- What is the increment operator?
- What is the decrement operator?
