An error that occurs during runtime is not recoverable whereas in most of the cases an exception can be recovered if it occurs during run time.
Key difference: Both, error and exceptions are derived java.lang.Throwable problems. An ‘error’ is a serious problem that cannot be recovered once occurred, whereas an ‘exception’ is a problem which can be handled and corrected after execution.
An ‘error’ in Java is a serious problem, which once occurred cannot be handled and recovered. An error is defined as “any departure from the expected behavior of the system or program, which stops the working of the system”. It comes under the Throwable class, which categorizes it as a serious and reasonable application. After its execution, this application re-occurs several times, creating an interruption in the systems functions. There are several subclasses under the error form. These errors occur at specific levels and functions, and are handled by specific functions. In a broader way, these errors can be broken into two categories: Design-time errors and Logical errors.
Basically, there are two main types of errors and their conditions:
Run-time error: These are executed at the running of the program.
Compile-tile error: These are executed at the compiler, during the compiling time.
Further these types are subdivided into other forms.