Consider the following program segment:

boolean finished = false;

do {

double d = Math.random();

if(d > .5) finished = true;

System.out.println(d);

} while (!finished);



Math.random( ) generates a decimal value which is less than 1. What should be the value of d so that the loop ends?