Code example for Random

Methods: nextBoolean

0
        assert new Range(left, right).contains(mid)
                : "For " + left + "," + right + ": range did not contain mid:" + mid;
        if (depth < 1)
            return; 
 
        if (rand.nextBoolean())
            assertMidpoint(left, mid, rand, depth-1);
        else 
            assertMidpoint(mid, right, rand, depth-1);
    } 
 
    @Test 
    public void testMidpoint() 
    { 
        assertMidpoint(tok("a"), tok("b"), 16); 
        assertMidpoint(tok("a"), tok("bbb"), 16); 
    } 
 
    @Test 
    public void testMidpointMinimum() 
Connect your IDE to all the code out there  Get Codota for Java