How to get a random number between two numbers, for example, from 20 to 30?
I tried:
val r = new scala.util.Random r.nextInt(30)
This allows you to use only the upper bound value, but the values ββalways start with 0. Is there a way to set the lower bound value (up to 20 in the example)?
Thanks!
source share