/* Author : Michael Robinson Program : forLoop.java Purpose : To present three samples of the for loop Updated : Jan 29, 2099 */ public class forLoop { public static void main( String arg[] ) { int x = 0; for( x = 0; x <= 5; x++ ) { System.out.print( x + " " ); } System.out.println(); for( x = 0; x < 6; x++ ) { System.out.print( x + " " ); } System.out.println(); for( x = 5; x > -1; x--) { System.out.print( x + " " ); } System.out.println(); }//end public static void main( String arg[] ) }//end public class whileLoop