Answers for "get random item in array java"

0

get raondom from array java

public static int getRandom(int[] array) {
    int rnd = new Random().nextInt(array.length);
    return array[rnd];
}
Posted by: Guest on June-04-2020

Code answers related to "get random item in array java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language