Issue
I just want to make a basic counter and for some reason I can't figure out how to draw a random number between 1 and 100. Can someone please explain what I have to do to draw a random number between 1 and 100?
This is what I came up with until now:
int value;
private int count = 1;
Random rand;
}
Solution
Random randomGenerator = new Random();
int randomInt = randomGenerator.nextInt(100);
log("Generated : " + randomInt);
Answered By - Kamal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.