Используйте класс Random :
int getRandomNumber(int[] arr) { return arr[(new Random()).nextInt(arr.length)]; }