所以基本上我试图用 9 个值填充 array[] 元素,但是我不确定如何在这段代码中获取索引。我希望它每次都填充数组中的下一个元素。
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?]
}
}
}