random - Java Generating numbers -
How do I generate between 0.00 and 100?
Like a function and after that I can call it like 'getRandom (0.00, 100)' P> < Googling is a random class that helps ...
Googling "Java Random" is the best result is created as first . Javadak context.
Then try, Edit: As a comment, I was wrong, it is included in 0 to 100. One by one easy mistake int rand = new random (). NextInt (101) . This will generate a random number from 0 to 101 Unique then it will generate a random number from 0 to 100.
Comments
Post a Comment