There is a random boolean generator in java random.nextBoolean()
But how can I generate boolean random values with 30% probability of true
Is there any such inbuilt function or one can make such a function out of the
existing function?
Asked
Active
Viewed 75 times
0
Juan
- 103
- 5
-
6`if (Math.random() < 0.3) {.....}` – Hovercraft Full Of Eels Aug 09 '21 at 00:51