Checked and Unchecked Exceptions in Java

There are two types of exceptions in Java i.e. checked and unchecked exceptions. Below I have explained about these two exceptions with examples. Checked and Unchecked Exceptions in Java Checked Exceptions Those exceptions that are checked at compilation time are called checked exceptions. Checked exception includes the classes that extend Throwable class except RuntimeException and Error. Some examples of checked exceptions are: InvocationTargetException SQLException ClassNotFoundException IOException If a method throws checked exceptions then it must handle them by try catch

Read more