Instructors' Guide

Introduction Terminology Expressions Control Objects Inheritance Technology Summary


Java provides roughly the same elementary control structures as C++.


slide: Java -- control

These include a conditional statement (of which the else part may be omitted), a selection statement (that allows for a default branch), an iteration statement (which is also offered in a reversed form to allow a repeat), a loop statement (consisting of an initialization part, a part to test for termination, and a repetition part to increase the loop variable) and, finally, jumps.