MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / condition

Method condition

control/WhileTest.java:8–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6
7public class WhileTest {
8 static boolean condition() {
9 boolean result = Math.random() < 0.99;
10 System.out.print(result + ", ");
11 return result;
12 }
13 public static void main(String[] args) {
14 while(condition())
15 System.out.println("Inside 'while'");

Callers 1

mainMethod · 0.95

Calls 2

printMethod · 0.80
randomMethod · 0.45

Tested by

no test coverage detected