Computer Science, asked by rekhatanyamaitri, 10 months ago

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 prashantrohilla32
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