-
The boolean Type
-
statements
- boolean text1 = true;
- test1 = text2
- test 3 = (3*100 < 250);
-
logical operators
- NOT
- AND
- OR
- Short-Circuited Evaluation
-
Fencepost Algorithms
-
Add initial output outside the loop
- if/else to this initial
- or double test
-
Sentinel Loops
- end input signal
-
The while loop
-
indefinite loops
- update step
- scope of variable
-
pseudorandom numbers
- Math.random()
-
Class Random (in java.util)
- nextInt(10);
- nextDouble();
- nextBoolean()
- save the random, if use again
- Priming a loop
-
do..while
- adapt to the prog you know you want to exe at least once