This question already has an answer here:
- Random boolean with weight or bias 8 answers
I have to generate a random boolean with percentage. I mean that I can for example say:
boolean randomBoolean = generateRandomBooleanWithPercantage(90)
Then the probability that it's true should be 90%.
Aucun commentaire:
Enregistrer un commentaire