title: Passing a 2d array and using recursion error
body: <p>I am doing an assignment and have trouble getting the code compiled. The code must have recursion. The idea is to pass a 2d array sequentially - row by row, column by column and to get a private helper method to match cases and return the result. </p>
  
  <p>I have tried looking at different solutions and everything seems in order, however I get an error:</p>
  
  <pre><code>required: int
  found: int[][]
  </code></pre>
  
  <p>I am passing an array, int row and int column to a method that should be accepting exactly those three. 
  Take a look:</p>
  
  <pre><code>public static int [][] calculateProximity ( boolean [][] mineField ) 
  {
    int [][] proximityField = new int [mineField.length][mineField[0].length];
  
    for (int row = 0; row &lt; mineField.length; row++) {
      for (int column=0; column &lt;mineField[row].length; column++) {
        proximityField [row][column] = calculateProximity (mineField, row, column);
      }
    }
  
    return proximityField;  
  }
  
  
  private static int [][] calculateProximity (boolean [][] mineField,
    int row, int column)
    {
      int [][] proximityField;
  
      if (row &gt;= mineField.length || column &gt;= mineField[row].length){
        return proximityField=0;
      }
      else if (mineField [row][column]= true){
        proximityField[row][column]=1;
        return proximityField;
      }
      else
      {
        proximityField[row][column]=0;
      }
  
      return proximityField;
  }
  </code></pre>
  
  <p>By the way, calculateProximity main method is to return an int 2d array, but it is given a boolean 2d array. </p>