Core Java Tutorials


Introduction

Java Hello World

Java Compilation

JDK New Features

JVM Architecture

Java OOPs Concepts

Java Package

Array

Exception Handling

String

Immutable Class

File Handling

Serialization

MultiThreading

Volatile

Concurrent Package

Collection

Collection Internal

Generics

Cloning

Reflection In Java

Annotation

Class Loader

Java Inner classes

Garbage Collector

JDBC

References In Java

Heap Dump & Thread Dump

Exception In Java:-

Exception in java is an error event that can happen during the execution of a program and disrupts its normal flow. When an exception occurs during the program execution then program execution gets terminated and does no’t continue further. if we want to avoid abnormal termination of program then we have to do exception handling.


Exception classes

In Java, exceptions are objects. When you throw an exception, you throw a java object. You can't throw just any object as an exception however -- only those objects whose classes descend from Throwable class. Throwable class serves as the base class for an entire family of exception classes, declared in java.lang package, that your program can instantiate and throw.

 Exception Class Hierarchy in java
error-exception-in-java