-
-
Save parzibyte/d52b522313d242ef3989083f1fa78ee9 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 numeroAleatorioEnRango(int minimo, int maximo) { | |
// nextInt regresa en rango pero con límite superior exclusivo, por eso sumamos 1 | |
return ThreadLocalRandom.current().nextInt(minimo, maximo + 1); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment