Answers for "pick a random index in an 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 "pick a random index in an array java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language