Use built-in (rejection algorithm) random sampling
The original method, uniform integer modulo 100000, is biased in distribution. Now it's replaced by built-in sampling method. Java 7 API has comments on random.nextInt(int n): https://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextInt(int)
Showing
Please register or sign in to comment