public class FlipACoin {
    public static void main(String[] args) {
        double randomNumber = Math.random();
        boolean isHeads = randomNumber > 0.5; // this will be true 50% of the time!
        if (isHeads) {
            System.out.println("Heads, I win!");
        } else {
            System.out.println("Tails, you lose!");
        }

    }
}