您的方法必须接受 2D 数组和 2 个索引,否则仅传递值:public void foo(int[][] array, int row, int column) { // you can access the cell's value by array[row][column] // you can also access adjacent cells such as array[row + 1][column]}public void foo(int value) { // here you only have access to the cell's value.}Java 中没有可以用来进行算术运算的“指针”。