ForTest4.java



public class ForTest4 {

    public static void main( String[] args ) {

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