Boolean Operations
Boolean Expressions are made up of:
- The boolean constants:
true
and false
- Boolean variables
- Method calls that return the
boolean
type
- Expressions using the comparison operators:
== != < > <= >=
- Expressions using the boolean operators:
&& || !
Boolean Expressions are most frequently used in:
if ( bool-expr )
or
else if ( bool-expr )
conditions
- loop conditions (
for
and while
)
Alyce Brady, Kalamazoo College