Skip to content

Instantly share code, notes, and snippets.

@michaelhollman
Created November 14, 2013 05:15
Show Gist options
  • Save michaelhollman/7461778 to your computer and use it in GitHub Desktop.
Save michaelhollman/7461778 to your computer and use it in GitHub Desktop.
Randomness
public static int randomInt(int min, int max) {
return (int) (Math.random() * (max - min + 1)) + min;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment