The Java programming language comes with advanced exception handling features that help programmers manage exceptional events. In Java, exceptions are either thrown by the compiler or occur during the execution of the program. Exceptions stop the normal flow of the program, so you need to handle them appropriately.

Java exceptions are events that disrupt the normal execution of the program. The main goal of exceptions is to separate error-handling from regular code. Exceptions might stem from a wide range of problems such as missing resources, coding errors, memory errors, and others. In Java, there are two kinds of exceptions:

  • Unchecked exceptions (runtime exceptions)
  • Checked exceptions (compile-time exceptions)


Java Exceptions: Common Terminology with examples
1.05 GEEK