Skip to content

Commit f27f57c

Browse files
committed
Move Errors section to the end of the introduction
1 parent 88297ef commit f27f57c

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

concepts/exceptions/introduction.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,6 @@ This type of exception is not checked at compile-time: methods that throw unchec
3333

3434
All 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

4838
A method in Java can throw an exception by using the `throw` statement.
@@ -135,3 +125,13 @@ Withdrawing -10.0
135125
Withdrawal failed: Cannot withdraw a negative amount
136126
Current 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.

0 commit comments

Comments
 (0)