Here you can find the source of getBoolean()
public static boolean getBoolean()
//package com.java2s; // under the terms of the GNU Lesser General Public License as published import java.util.Random; public class Main { /** The random number generator used by the methods in this class. */ public static final Random rand = new Random(); /**/* w ww. ja v a 2 s . com*/ * Returns a pseudorandom, uniformly distributed boolean. */ public static boolean getBoolean() { return getBoolean(rand); } /** * Returns a pseudorandom, uniformly distributed boolean. * * @param r the random number generator to use */ public static boolean getBoolean(Random r) { return r.nextBoolean(); } }