- Checked exceptions occur at compile time.
- The compiler checks a checked exception.
- These types of exceptions can be handled at the time of compilation.
Example - File Not Found Exception, No Such Field Exception
- Unchecked exceptions occur at runtime.
- The compiler does not check these types of exceptions.
- These types of exceptions cannot be a catch or handled at the time of compilation because they get generated by the mistakes in the program.
Example - Empty stack exception, Arithmetic exception, null pointer exception.