Here's a simple example:
Say there is a max of 20 values being generated: 0-19
boolean[] savePastNbrs = new boolean[20]; // define an array to detect if a number has been used (init to false)...
Type: Posts; User: Norm
Here's a simple example:
Say there is a max of 20 values being generated: 0-19
boolean[] savePastNbrs = new boolean[20]; // define an array to detect if a number has been used (init to false)...
Then you need to save the previous numbers. When you get the next random number, check if you've saved it, if not save and return it, else get another number.
How and where you save the the...