Here you can find the source of generateRandomBoolean()
public static boolean generateRandomBoolean()
//package com.java2s; public class Main { public static boolean generateRandomBoolean() { return Math.random() >= 0.5; }//from ww w. jav a 2 s . c om }