I need to generate some random booleans. However I need to be able to specify the probability of returning true. As a results doing:
true
private R
public boolean getBiasedRandom(int bias) { int c; Random t = new Random(); // random integers in [0, 100] c=t.nextInt(100); if (c>bias){return false; } else{return true;} }
This one is based on percentage...