Skip to content

Instantly share code, notes, and snippets.

@paulbrodner
Created December 14, 2018 18:54
Show Gist options
  • Select an option

  • Save paulbrodner/94b6d8a20e66c859b00ea230c8fc19fc to your computer and use it in GitHub Desktop.

Select an option

Save paulbrodner/94b6d8a20e66c859b00ea230c8fc19fc to your computer and use it in GitHub Desktop.
return random value from array
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