cannot convert from int to int[][]

I need to "change all number *n* in the array by *|M-n*, where *M* is the result of method Average applied on the input 2D-Array."

I was given some partially completed code:

Code:

`public **** Modify(xxxx){`

for(int i = 0; i < 10; i++){

for(int j = 0; j < 10; j++){

compute average

for(int i = 0; i < 10; i++){

for(int j = 0; j < 10; j++){

{

matrix[][] = m - matrix[][];

check if the value is < 0, if < 0 then make it positive

SOP(.....);

}

}

return matrix;

}

Here's my code:

Code:

` public static int[][] Modify(int [][] array1)`

{

int sum = 0;

for (int row = 0; row < array1.length; row++){

for (int col = 0; col < array1[row].length; col++){

sum = sum+array1[row][col];}}

int average = sum / 100;

for (int row= 0 ; row < array1.length; row++){

for (int col = 0; col < array1[row].length; col++){

array1 = average - array1[row][col];

if(array1[row][col] < 0)

On the second to the last line, I get this error: "Type mismatch: cannot convert from int to int[][]"

Any ideas?