java choose random enum
return yourEnum.values()[new Random().nextInt(yourEnum.values().length)];
java choose random enum
return yourEnum.values()[new Random().nextInt(yourEnum.values().length)];
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);
get random number from enum in java
return Letter.values()[new Random().nextInt(Letter.values().length)];
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us