3 ms·
Not to harp, but your set is better defined as [0, 100), that is, [0, 99], not the [1, 100] you mention in the article. nextInt(int): Returns a pseudorand
by Alupis 9y ago
Not to harp, but your set is better defined as [0, 100), that is, [0, 99], not the [1, 100] you mention in the article.
nextInt(int):
Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive)
https://docs.oracle.com/javase/7/docs/api/java/util/Random.html#nextInt(int) https://docs.oracle.com/javase/7/docs/api/java/util/Random.h...
- davelnewton 9y agoMore or less what I said, I think.