7.2. Repetition

At this point, we’re primarily interested in counting for loops. The other loops are useful as well, but the for loop will be a real workhorse through the rest of the semester. Make sure that you understand how to use it productively.

7.3-7.5. Repetition in Processing & Examples

This section is optional.

The examples shown above and many of the examples in Section 7.2 of the text will work in either Processing or in Java. However, Processing doesn't easily support text input, so the text examples that use the Scanner class will not work in Processing. This is part of the reason that the materials transition to Java; you need experience with console-based input.

The text will continue to include Processing-based examples, which can be made to work in pure Java (see Chapter 11), but the focus has now shifted to pure Java and Java Integrated Development Environments (IDEs).

7.6. Recursion

Skip this section for now, we’ll return to it later in the course.