There are two types of exceptions present in the java language
1) Predefined Exceptions.
2) User defined Exceptions.
Predefined Exception :
Predefined classes comes along with the software based on your requirement we have to create a objects.
User defined Exceptions :
Based on the user requirement user can creates a Exception is called user defined Exception.
To create user defined Exceptions:
1) To create user defined exception we have to take an user defined class that is a sub class to the RuntimeException(for creation of unchecked Exceptions) .
2) To create user defined exception we have to take user defined class that is subclass to the Exception(for creation of checked Exceptions)
3) Each and every Exception contains two constructors
a) default constructor
b) parameterized constructor