I am making an Array that is 10 integers long, so that each place 0-9 contains a different integer 0-9.
I am having trouble figuring out how to check if the array already contains a certain number, and if so, regenerating a new one.
So far I have:
for (int i = 0; i < perm.length; i++)
{
int num = (int) (Math.random() * 9);
int []
perm[i] = num;
}