Created
December 14, 2018 18:54
-
-
Save paulbrodner/94b6d8a20e66c859b00ea230c8fc19fc to your computer and use it in GitHub Desktop.
return random value from array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static List<String> KEYS = Arrays.asList( | |
| "customer.1", | |
| "customer.2", | |
| "customer.4", | |
| "customer.4" | |
| ); | |
| private Random random = new Random(); | |
| private String randomKey() { | |
| return KEYS.get(random.nextInt(KEYS.size())); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment