Java Arena

Module 5

Making decisions

Programs that choose what to do. if, blocks and indentation, the comparison operators, else, else if chains, and why the order of conditions matters.

Steps

  1. if
  2. Blocks and indentation
  3. Comparison operators
  4. else
  5. else if chains
  6. The first true branch wins