public class LoopTypes { public static void main(String[] args) { // TODO Auto-generated method stub // 3 ways to increment/decrement loop control variables /*int x = 1; x = x +1; //2 x += 1; x++; x = x - 1; x -= 1; x--; System.out.println(x);*/ int i = 0; //While loop /*while (i < 10) { System.out.println("While Loop, iteration " + i); i++; } System.out.println("The While Loop Ended");*/ //Do While Loop /*do { System.out.println("Do-While Loop, iteration " + i); i++; }while(i<10); System.out.println("The Do-While Loop Ended");*/ /* for(loop control variable initialization; termination condition; increment or decrement statement) */ for(int j = 0; j <10; j++) { System.out.println("for Loop, iteration " + j); } System.out.println("The for Loop Ended"); } }