我得到:标线(*)的Java:访问指针
for (int i = 0; i < boardSize; i++) {
for (int j = 0; j < boardSize; j++) {
rows[i].getSquare(j) = matrix[i][j]; // * points to the (in (j)
columns[j].getSquare(i) = matrix[i][j]; // * points to the (in
int[] b = getBox(i, j);
int[] boxCord = getBoxCoordinates(i + 1, j + 1);
boxes[b[0]][b[1]].getSquare(boxCord[0], boxCord[1]);
}
}
上 '意外型
要求:可变
发现价值' 这是我行类:
private Square[] row;
Row(int rowCount) {
this.row = new Square[rowCount];
}
public Square getSquare(int index) {
return this.row[index];
}
请帮我指出我在这里做错了什么。
在此先感谢。
以前的问题有一些很好的答案,你真的应该接受其中的一些 – Perception 2012-04-09 15:35:49