Last active
November 12, 2016 12:47
-
-
Save gotoark/c00d26b292c826866ab8ad4e725274c1 to your computer and use it in GitHub Desktop.
Create Random Number With in The Range min-max(both values inclusive)
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
//Generate Random Numbers | |
final int min = 0; | |
final int max = 9; | |
Random g=new Random(); | |
final int random = g.nextInt((max - min) + 1) + min; //Random number 0(inclusive)-9(inclusive) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment