So I have a problem with my code, and I can't figure it out for the life of me.
Here's the code...
The error I get is "Cannot find symbol - method nextInt(int)" The error is on line 13.
Any help would be great! Thanks.
Here's the code...
public class Numbers
{
int[] numbers = new int[25];
{
for(int i=0;i<25;i++)
numbers[i] = i+1;
int size = 25;
Numbers rnd = new Numbers();
for(int row=0;row<4;row++)
{
for(int col=0;col<5;col++)
{
int r = rnd.nextInt(size);
System.out.print(numbers[r]+"\t");
numbers[r]=numbers[size-1];
size--;
}
System.out.println("");
}
}
}
The error I get is "Cannot find symbol - method nextInt(int)" The error is on line 13.
Any help would be great! Thanks.