I am working on porting an existing VB.Net application to Java, and could not find an equivalent to Random.Next(Int32, Int32).
I could find only java.util.Random.next(int val) in the Java API.
Is there an Equivalent of .Net framework’s Random.Next(Int32, Int32) in the Java API?
As Marc says, just adapt
Random.nextInt(int), with a couple of sanity checks: