

Loop control variable - controls the number of time that the loop iterates This is usually done by incrementing the variable. it must update the control variable during each iteration.When the control variable reaches its maximum value, the loop terminates must test a control variable by comparing it to a maximum value.must initialize a control variable to a starting value.Increment operator - increase value by one number++ number++ = number = number + 1 ĭecrement - decrease value by one number- = number = number - 1 Ī loop is a control structure that causes a statement or group of statements to repeat 2 Kinds of LoopsĬonditional Loop - executes as long as a particular condition existsĬount-Controlled Loop - a loop that repeats a specific number of times

Primitive data types - you use these data types to create variables which are storage locations in the computer's memory - they have no other built in capability other than storing a value.īyte short int long char float double boolean Chapter 4 Increment & Decrement Starting Out with Java 4th Edition - Tony Gaddis
