SyntaxFix
Write A Post
Hire A Developer
Questions
int min = 65; int max = 80; Random r = new Random(); int i1 = r.nextInt(max - min + 1) + min;
Note that nextInt(int max) returns an int between 0 inclusive and max exclusive. Hence the +1.
nextInt(int max)
int
+1