Answers for "get a random value from an enum constant"

-1

get random number from enum in java

return Letter.values()[new Random().nextInt(Letter.values().length)];
Posted by: Guest on May-03-2020

Code answers related to "get a random value from an enum constant"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language