Forum Discussion
coexmatrix
13 years agoOccasional Contributor
This solution works great. I set the random number to stop at 5 digits:
int a = 9
nr = ""
for(i = 0; i < 5; i++)
{
random = new Random()
randomInteger= random.nextInt(a)
nr = nr + randomInteger
}
log.info nr
However, how would I make it so that the number generated couldn't go higher than say 50000?
int a = 9
nr = ""
for(i = 0; i < 5; i++)
{
random = new Random()
randomInteger= random.nextInt(a)
nr = nr + randomInteger
}
log.info nr
However, how would I make it so that the number generated couldn't go higher than say 50000?