Exceptions are objects that are thrown by an application or the Java Virtual Machine (JVM) when an error of some sort occurs. Java provides a wide range of predefined exceptions and allows the developer to declare and create their own exception classes.
While there are a number of ways of classifying exceptions, one scheme classifies them into three types:
Program errors are internal flaws in a code sequence. The programmer may or may not be able to do much about these types of errors. For example, a common exception is
. This is frequently a result of not properly initializing or assigning a value to a reference variable. ...