Here you can find the source of randomPer(long num, long divisor)
public static boolean randomPer(long num, long divisor)
//package com.java2s; //License from project: Apache License import java.util.concurrent.ThreadLocalRandom; public class Main { public static boolean randomPer(long num, long divisor) { return ThreadLocalRandom.current().nextLong(0, divisor) < num; }/*ww w . j a v a2 s . c o m*/ }