Created
August 20, 2020 03:30
-
-
Save parzibyte/296091fce572d35d47d3f58eeb19aa0b to your computer and use it in GitHub Desktop.
This file contains 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
public static int getRandomNumber(int min, int max) { | |
// nextInt regresa en rango pero con límite superior exclusivo, por eso sumamos 1 | |
return ThreadLocalRandom.current().nextInt(min, max + 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment