Difference between error and exception in Java
Errors and exceptions both inherit from Throwable, but they differ in these ways:
Exceptions | Errors |
---|
Any departure from the expected behavior of the system or program, which stops the working of the system is an error. | Any error or problem which one can handle and continue to work normally. |
Can be checked or unchecked | Are always unchecked |
Indicate an error caused by the programmer | Usually indicate a system error or a problem with a low-level resource |
Should be handled at the application level | Should be handled at the system level, if possible |
Download the Android app to get all Government Job Notifications on your Mobile.
Download Now
Important: Please always Check and Confirm the above details with the official Advertisement / Notification.