Exception Handling

Recent Articles


Java 7 gave us try-with-resources, a nice feature on exception handling. This tutorial is part 3 of the exception handling series. Part I is about basics of exception handling. Part II is about exception hierarchy, stack traces, handling exception and best practices. Now in this part three of exception handling tutorial, we will see about […]
Published to Core Java Tutorial on 17/02/2013.

Exception Handling – Part II

Java has a hierarchy defined for exception classes. This tutorial is second in the multi-part series for java exception handling. Previous tutorial serves as an introduction to java exception handling and this one takes it to the next level. Exception Hierarchy Throwable is the base class of all exceptions in java. Throwable has two direct […]
Published to Core Java Tutorial on 14/01/2013.

Exception Handling – Part I

Java has many wonderful things and exception handling is one among them. Exception handling is a framework provided by Java to ensure program execution continues in an unfavorable problem condition by handling it gracefully. Exception handling is not new to Java guys and I need not give a heroic introduction to it. This is my […]
Published to Core Java Tutorial on 06/01/2013.

What are the causes of exceptions in java?

A java exception can be thrown only in the following three scenarios: (1) An abnormal execution condition was synchronously detected by the Java virtual machine. – When evaluation of an expression violates the normal semantics (Example: an integer divide by zero) – An error occurs in loading or linking part of the program – When […]
Published to Java Exception Tutorial on 15/10/2008.

Checked vs Unchecked Exceptions

Type of exceptions in java are checked exceptions and unchecked exceptions. This classification is based on compile-time checking of exceptions. There is also a classification based on runtime in java. It is not widely known! That is synchronous and asynchronous exceptions. First let us see the java checked exceptions and unchecked exceptions. Checked Exceptions Vs […]
Published to Java Exception Tutorial on 14/10/2008.