Java Reference
In-Depth Information
2
Conditional Structures and Loops
2.1 Instruction workflow
In this chapter, we start by describing how programmers can control the
execution paths of programs using various branching conditionals and looping
structures. These branching/looping statements act on blocks of instructions
that are sequential sets of instructions. We first explain the single choice if
else and multiple choice switch case branching statements, and then describe
the structural syntaxes for repeating sequences of instructions using either the
for , while or do while loop statements. We illustrate these key conceptual
programming notions using numerous sample programs that emphasize the
program workflow outcomes. Throughout this chapter, the leitmotiv is that
the execution of a program yields a workflow of instructions. That is, for short:
Program runtime = Instruction workflow
 
Search WWH ::




Custom Search