Checked exceptions are classes derived from
Exception class and are thrown when the program can recover from the exception and they must either be caught using one of the
try blocks or rethrown. Unchecked exceptions are classes derived from
RuntimeException and are thrown when the program cannot recover from the exception and they don’t have to be caught or rethrown. Generally, unchecked exceptions are a result of a programming error and can be avoided (e.g. checking if a variable is null to prevent
Since unchecked exceptions produce cleaner code, programmers favor it over checked exceptions and nowadays it basically comes down to a personal choice. However, exceptions in the Java API abide the difference.