Answers for "generate 10 random numbers in java"

2

how generate a random number in java between 3 and 5

public int getRandomNumber(int min, int max) {
    return (int) ((Math.random() * (max - min)) + min);
}
Posted by: Guest on July-12-2021
3

random numbers java

int random = (int) (Math.random()*(max-min+1)+min);
Posted by: Guest on January-03-2021

Code answers related to "generate 10 random numbers in java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language