The difference between Error and RuntimeException

The difference between Error and RuntimeException

The difference between the two:

Exception:

1. May be controlled (the checked) or uncontrollable (an unchecked) 

2. It represents an error caused by the programmer 

3. It should be handled at the application level

 

Error:

1. Always uncontrollable (unchecked) 

2. Often used to denote system error or errors in low-level resources 

3. How, if possible, should be captured at the system level

 

Guess you like

Origin www.cnblogs.com/Yanss/p/11685128.html