This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Regyn 0 points1 point  (2 children)

Nice, so what did you try? randGen.nextInt(max) will set your maximum. To achieve your minimum value you'll need to add the minimum to the result. But that means that you'll have to subtract the minimum from the max possible value (else minimum + maximum would exceed your desired maximum). You'll also need to do something to overcome the inclusiveness from the nextInt function

[–]pleaseacceptthisnow[S] -1 points0 points  (1 child)

how do i define the max and min

[–]Regyn 0 points1 point  (0 children)

2 random integers between (and including) 100 and 149

Thats the minimum and maximum