Checked Exceptions vs Unchecked Exceptions

Checked Exceptions vs Unchecked Exceptions

Checked ExceptionsUnchecked Exceptions
DefinitionExceptions that are checked at compile-timeExceptions that occur at runtime and are not checked at compile-time
Handling RequirementMust be either caught using a try-catch-finally block or declared in the method signature using the throws keywordNot required to be caught or declared
Use CaseRelated to external factorsRelated to logic issues
ExamplesIOException, SQLExceptionNullPointerException, ArrayIndexOutOfBoundsException