Write a valid statement for the following in JAVA=> Print a random integer between 25 and 35. The first correct answer will be marked the brainliest. It's urgent please.....
Answers
Answered by
3
Answer:
import java.util.Random;
public class Main
{
public static void main(String[] args) {
int min=25;
int max=35;
Random r = new Random();
int z=r.nextInt((max - min) + 1) + min;
System.out.println(z);
}
}
Explanation:
Similar questions
Chemistry,
4 months ago
Political Science,
10 months ago
English,
10 months ago
Science,
1 year ago
Geography,
1 year ago