What is Exception how many types of exception?
James Olson
Updated on May 24, 2026
Similarly, what is exception and different types of exception?
You will also learn about different types of exceptions in Java. Exceptions are the unwanted errors or bugs or events that restrict the normal execution of a program. Each time an exception occurs, program execution gets disrupted. An error message is displayed on the screen.
Also Know, what do you mean by an exception? Definition: An exception is an event, which occurs during the execution of a program, that disrupts the normal flow of the program's instructions. When an error occurs within a method, the method creates an object and hands it off to the runtime system. This block of code is called an exception handler.
People also ask, what are the types of exception?
Types of Exception in Java with Examples
- ArithmeticException. It is thrown when an exceptional condition has occurred in an arithmetic operation.
- ArrayIndexOutOfBoundsException.
- ClassNotFoundException.
- FileNotFoundException.
- IOException.
- InterruptedException.
- NoSuchFieldException.
- NoSuchMethodException.
What is the super class of exception?
The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement.