In Java, how an exception is raised we can divide exceptions into two categories-
- JVM Exceptions
- Programatic Exceptions
JVM Exceptions
Exceptions raised by JVM whenever a particular events occur are known as JVM Exceptions.
For Example- AirthmecticException, NullPointerException, etc.
Programmatic Exceptions
The exceptions which are raised explicitly by the programmer or developer to indicate that something goes wrong are known as programmatic Exceptions. These Exceptions are also known as User Defined Exceptions or customized Exceptions.
Similar Java Tutorials
- Odd Even in Java
- Encapsulation in Java
- Abstraction in Java
- Data Hiding in Java
- Interface vs abstract class
- Method Overriding in Java
- Method Overloading in Java
- Coupling in Java
- Method to print exception information in Java
- Exception Handling by Using try-catch in Java
- Checked Exception vs Unchecked Exception
- Exception Hierarchy in Java
- Java Exception Handling Interview Questions
- final finally finalize in java
- User Defined Exception in Java
- Exception Handling Keyword in Java
- throw throws in Java
- try with multiple catch block in Java