WhileTest2.java



public class WhileTest2 {

    public static void main( String[] args ) {

        double x = Math.random();
        System.out.println( "x=" + x );
        while( x < 0.9 ) {
            x = Math.random();
            System.out.println( "x=" + x );
        }
        System.out.println( "outof the loop" );
    }
}