Exception Handling in Java
‘Exceptions’, handling them, declaring them is yet another objective of the OCPJP exam. We will be dealing with ‘Exceptions’ and more particularly ‘Handling Exceptions’ in this post. According to the Oracle website, “An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program’s instructions.” (Java Tutorials) When the normal flow is disrupted and an exception is thrown, the exception is handled by means of a “try-catch” block. Types of exceptions: There are three types of exceptions – Checked exceptions, Errors and Runtime exceptions. This is the hierarchy of exceptions: […]
Exception Handling in Java Read More »