Computers are often used to automate repetitive tasks. Repeating tasks without making errors is something that computers do well and people do poorly.
Running the same code multiple times is called iteration. We have seen methods, like
factorial, that use recursion to iterate. Although recursion is elegant and powerful, it takes some getting used to. Java provides language features that make iteration much easier: the