Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
> Why not just use java.util.Random? or use Math.random() as a basis for calculating a random number within the range tou need Those will generate a random number, but allow for repeats. I am trying to generate a list of numbers in random order. Once a number has been generated within that range and stored it cannot be generated again. With those two methods I believe it would be posssible, though very unlikely, to get e.g. (55, 55, 55, 55, 55...) generated. This program, however, cannot have even one number repeat. Tell me if I am wrong Replies:
|
Sponsored Links
|