java random pick from array code example
Example: get raondom from array java
public static int getRandom(int[] array) {
int rnd = new Random().nextInt(array.length);
return array[rnd];
}
public static int getRandom(int[] array) {
int rnd = new Random().nextInt(array.length);
return array[rnd];
}