diff --git a/src/SUMMARY.md b/src/SUMMARY.md index b14d6e1..1ec6415 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -109,6 +109,7 @@ Gui stuff - [AI](./prelude/ai.md) - [Java](./prelude/java.md) + # Modern Java @@ -144,7 +146,6 @@ Gui stuff - [Creating Files](./the_terminal/creating_files.md) - [Run Java Programs](./the_terminal/run_java_programs.md) - [Getting Used to it](./the_terminal/getting_used_to_it.md) - - [Challenges](./the_terminal/challenges.md) diff --git a/src/integers/remainder.md b/src/integers/remainder.md index c03e872..8196943 100644 --- a/src/integers/remainder.md +++ b/src/integers/remainder.md @@ -3,13 +3,18 @@ To get the remainder of the division between two integers you can use the `%` operator. This is called the "modulo operator." +With `int`s `7 / 2` will give you `3`. That `3` is the "quotient" from the division +and is the number of times `2` can be taken out of `7`. This leaves a "remainder" of `1`. + +The modulo operator gives you that remainder. + ```java ~void main() { int x = 5; -// The remainder of 5 / 2 is 1 +// 5 / 2 is 2 with a remainder of 1 // y will be 1 int y = x % 2; -// The remainder of 5 / 3 is 2 +// 5 / 3 is 1 with a remainder of 2 // z will be 2 int z = x % 3; diff --git a/src/the_terminal/getting_used_to_it.md b/src/the_terminal/getting_used_to_it.md index d80f56d..f9ad555 100644 --- a/src/the_terminal/getting_used_to_it.md +++ b/src/the_terminal/getting_used_to_it.md @@ -5,4 +5,4 @@ comfortable using the terminal for things. Thats normal. You'll get there eventually. Just know that at least some familiarity with the terminal is going to be needed. -We'll get back to it relatively soon, but feel free to seek out some bash/terminal specific resources online in the meantime. \ No newline at end of file +We'll get back to it eventually, but feel free to seek out some bash/terminal specific resources online in the meantime. \ No newline at end of file