/* * For loop syntax (compared to while loop) */ public class ForLoopDemo1 { public static void main(String[] args) { // // initialize control variable // int counter = 1; // // check the boolean expression // while (counter <= 10) { // System.out.println(counter); // counter++; // update the control variable // } for (int counter = 20; counter <= 200; counter += 5) { System.out.println(counter); } } }