Easy learning with example program codes

how the exceptions are handled in java?

Exception handling is a mechanism to handle runtime errors, so that normal flow of the program can be maintained.

How to write an exception handler?

To write a simple exception handler, first enclose the code that might throw an exception within try block. When an exception occurs in try block, it will be handled by an appropriate exception handler. Exception handler can associate with try block by using catch block or finally block after it.

Note: catch and finally block both can be attached with single try block. Hierarchy should be try-catch-finally.

Java interview questions on exception handling

Industrial Training

We offers Placement Oriented Training on Java, Spring, JSF, Hibernate, PHP, AngularJS, Angular 4, PLSQL, Oracle BI Publisher etc. We also provides Online training, please mail us at


We also provides the Development services for Website Development , Java Development, PHP Development, Android App Development etc. You can contact us on

Copyright © 2019 CodesJava Protection Status SiteMap Reference: Java Wiki