+ 1
What coding I used for random number??
2 Réponses
+ 2
for 1 number between 1 to 100. You can modify the ranges and amount of random numbers.
+ 1
import java.util.Random;
public class Program
{
public static void main(String[] args) {
Random rn = new Random(); for(int i =0; i < 1; i++) { int answer = rn.nextInt(100) + 1; System.out.println(answer); }
}
}