Here is the deal: I have a java code that generates a random number between two numbers and it works just fine. But i'm trying to achieve something. I want it in such a way that after the first number has been generated, when it recalls it, it doesn't generate that same number. For instance, if number 4 is generated, i want it now to be included among the possible generated numbers for the second time. To make things a little bit clear, here's my code.
int Maximum=10;
int Minimum=1;
int r;
r = (int)(Math.random() * Maximum) + Minimum;
is there anything i can do to make the code above not to generate a particular number between 1 and 10? Thanks.