metodo random java code example
Example 1: generate random number java
// JAVA - WITH A RANGE
(Math.random() * ((max - min) + 1)) + min
Example 2: funzione random in java
int n = (int) (Math.random() * 51);
// JAVA - WITH A RANGE
(Math.random() * ((max - min) + 1)) + min
int n = (int) (Math.random() * 51);