So basically I am trying to fill the array[] element with 9 values, however I am not sure how to get the index within this code. I want it to fill the next element in the array each time.
public boolean check(int data[][], int x, int y){
int array[] = new int[9];
int xmax = x+3;
int ymax = y+3;
for(int i = x; i<xmax; i++){
for(int j = y; j<ymax; j++){
array[] = data[i][j];//array[what here?]
}
}
}
1 Answer