System.out.println( (int)(Math.random()*5) + 3 ); // int from 3 to 8 System.out.println( (int)Math.random()*4 + 5 ); //always int 5 System.out.println( (int)(Math.random()*50) ); // int from 0 to 50
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!