get random number from enum in java

Java
return Letter.values()[new Random().nextInt(Letter.values().length)];
Source

Also in Java: