Documentation for scala.util.Random.nextInt (n: Int): Int says "Returns a pseudorandom, uniformly distributed int value between 0 (inclusive) and the specified value (exclusive)…" while for scala.util.Random.nextInt (): Int it says "Returns the next pseudorandom, uniformly distributed int value…", without saying anything about the zero. Can I get a negative value here occasionally?
Documentation for scala.util.Random.nextInt (n: Int): Int says "Returns a pseudorandom, uniformly distributed int value
Share
Apparently, yes. It returned a negative value on my first try! 🙂