I am very new to Java and I am stuck on this, I am using the formula:
min + (int)(Math.random()*(max-min+1))
and I have to write statements that assign random integers to the variable x in the following ranges
- 1 < x <= 8
 1 being min and 8 being max- Am I correct that it would be - 1 + (int)(Math.random()*(8-1+1))?
- -5 < x <= 3
 3 being min and -5 being max- and this would be - 3 + (int)(Math.radom()*(-5-3+1))?
Any help would be greatly appreciated.
 
     
     
     
     
    