Classification of exceptions
On the use
Error does not have to worry about the virtual machine errors
Exception must be caught with a catch.
Runtimeexcption can be handled or not handled
Description
Error: Called a bug, generated and thrown by a Java virtual machine, including a dynamic connection failure, a virtual machine error, which the program does not handle.
Exception: The parent class of all exceptions, whose subclasses correspond to a variety of possible exception events, typically requiring the user to display a declaration or capture.
Runtime Exception: A special kind of exception, such as by 0, array subscript beyond the range, it is more frequent, processing trouble, if the display of the declaration or capture will be more efficient in the operation of the readability of the program. Therefore, the system automatically detects them and gives them to the default exception handlers (which the user does not have to handle).
Exceptions in Java (ii)