Difference between Checked and Unchecked exception - A checked exception throws a block of code and represented by the throws keyword. It is utilized to handle invalid criterions outside the control like invalid input, database issues, network outages, unavailable files.
- An unchecked exception is utilized for representing defects in the program like invalid arguments passed to methods.
- A checked exception need to be handled by try and catch blocks. A checked exception is a compile time exception.
- Unchecked exception is a runtime exception.