File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -33,16 +33,6 @@ This type of exception is not checked at compile-time: methods that throw unchec
3333
3434All unchecked exceptions inherit from ` RuntimeException ` , which itself is an extension of ` Exception ` .
3535
36- ## Errors
37-
38- Java also has a separate category called _ Errors_ which are serious problems that are external to an application.
39- An example of an error is the ` OutOfMemoryError ` which occurs when an application is trying to use more memory than is available on the system.
40-
41- Like unchecked exceptions, errors are not checked at compile-time and are not usually thrown from application code.
42- Unlike exceptions, Errors represent serious system-level problems that applications should generally not attempt to catch or handle.
43-
44- All errors in Java inherit from the ` Error ` class.
45-
4636## Throwing exceptions
4737
4838A method in Java can throw an exception by using the ` throw ` statement.
@@ -135,3 +125,13 @@ Withdrawing -10.0
135125Withdrawal failed: Cannot withdraw a negative amount
136126Current balance: 5.0
137127```
128+
129+ ## Errors
130+
131+ Java also has a separate category called _ Errors_ which are serious problems that are external to an application.
132+ An example of an error is the ` OutOfMemoryError ` which occurs when an application is trying to use more memory than is available on the system.
133+
134+ Like unchecked exceptions, errors are not checked at compile-time and are not usually thrown from application code.
135+ Unlike exceptions, Errors represent serious system-level problems that applications should generally not attempt to catch or handle.
136+
137+ All errors in Java inherit from the ` Error ` class.
You can’t perform that action at this time.
0 commit comments