java random from enum code example
Example 1: return random from enum
//Return a random int number between min [inclusive] and max [inclusive]
//Make sure maxNumber does not exceed number of enum values
(EnumType)Random.Range(minNumber, maxNumer);
Example 2: get random number from enum in java
return Letter.values()[new Random().nextInt(Letter.values().length)];