Answers for "how to choose something randomly in enum is java"

1

java choose random enum

return yourEnum.values()[new Random().nextInt(yourEnum.values().length)];
Posted by: Guest on May-12-2021

Code answers related to "how to choose something randomly in enum is java"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language