Beginner module
Module 4: Decision Making
Use booleans, conditions, `if` statements, and `switch` to make your programs choose the right path.
Module lessons
Module 4: Decision Making
0/5 complete0% complete
01
Booleans and Conditions
Use boolean values and readable conditions as the foundation for every branching statement in Java.
12 min
Next
02
`if` and `else`
Run one block when a condition is true and another block when it is false.
14 min
Ready
03
`else if` Chains
Check more than two possible cases in a clear top-to-bottom order.
14 min
Ready
04
`switch` Statements
Use `switch` when you need to pick one path from a small set of known values such as menu choices or days of the week.
12 min
Ready
05
Input Validation with Conditionals
Use conditions to reject bad input and accept only values that make sense for your program.
14 min
Ready
Advertisement