You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update introduction.md
Added comparison operator example, removed the reference to truthy values as it will only confuse new programmers
* Update concepts/numbers/introduction.md
Co-authored-by: Jason Runkle <jmrunkle@gmail.com>
Co-authored-by: Jason Runkle <jmrunkle@gmail.com>
Copy file name to clipboardExpand all lines: concepts/numbers/introduction.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -7,7 +7,7 @@ There are two different types of numbers in Java:
7
7
8
8
The two most common numeric types in Java are `int` and `double`. An `int` is a 32-bit integer and a `double` is a 64-bit floating-point number.
9
9
10
-
Arithmetic is done using the standard arithmetic operators. Numbers can be compared using the standard numeric comparison operators and the equality (`==`) and inequality (`!=`) operators.
10
+
Arithmetic is done using the standard arithmetic operators. Numbers can be compared using the standard numeric comparison operators (eg. `5 > 4` and `4 <= 5`) and the equality (`==`) and inequality (`!=`) operators.
11
11
12
12
Java has two types of numeric conversions:
13
13
@@ -30,4 +30,4 @@ if (x == 5) {
30
30
}
31
31
```
32
32
33
-
The condition of an `if` statement must be of type `boolean`. Java has no concept of _truthy_ values.
33
+
The condition of an `if` statement must be of type `boolean`.
0 commit comments