/* Author : Michael Robinson Program : whileLoopEndless.java Purpose : To present the while loop Updated : Jan 29, 2099 */ public class whileLoopEndless { public static void endLessLoop() { //this is an endless while loop int counter = 0; while( true ) { if( counter > Math.pow( 10.0, 2.0 ) ) { System.out.println( "\nCounter is > Math.pow( 10.0, 2.0 ) = " + counter ); break; //terminate while loop } counter++; }//end while( true ) }//end public static void endLessLoop() public static void main( String arg[] ) { endLessLoop(); }//end public static void main( String arg[] ) }//end public class whileLoopEndless