if and the boolean data type
The notes.
- revisit the if statement
- introduce boolean expressions
- the value of a boolean is either true or false.
- relational operators compare numbers and produce a boolean value.
>, <, >=, <=, ==
- logical operators take boolean values and produce a new boolean value.
&&,
||,
!,
- boolean variables: can be assigned the value of a boolean expression.
- methods can return a boolean type.
External links