WhileTest3.java



public class WhileTest3 {

    public static void main( String[] args ) {

        double x;
        while( (x = Math.random()) < 0.9 ) {

            System.out.println( "x=" + x );
        }

        System.out.println( "x=" + x );
        System.out.println( "outof the loop" );
    }
}