Chapter 5. Control Instructions
A program needs to be able to repeat code and skip over sections of the code. High-level languages like Java provide constructs such as
while for structured programming. Control structures like
while make it easy to see where control of a program goes, because programs can enter each loop only at the beginning and leave at the end. The idea behind structured programming is that larger units of code are divisible into smaller units, which are themselves composed of yet smaller units.
The JVM does not support structured programming directly. The only unit of code is the instruction. In place of structured programming constructs, the JVM provides instructions to jump directly from one place ...