WhileTest5.java



public class WhileTest5 {

    public static void main( String[] args ) {

        System.out.println( "into the loop" );
        double x;
        while( true ) {

            x = Math.random();
            System.out.println( "x=" + x );
            if( x > 0.9 )
                break;
        }
        System.out.println( "outof the loop" );
    }
}