title: How to correct a recursive implementation of counting equal items on matrix diagonal?
body: <p>This recursive method for counting the number of equal elements of a n x n matrix does not work. from debugging it keeps returning the same value, stops counting and keeps i and j equal to 1. Help apreciated ! </p>
  
  <pre><code>private static int checkSecDiag(int i,int j,int count,int col,char[][] board){
      if(i == col-1)
          return count;
      if(board[i][j] == board[i+1][j-1]) count ++;
      i++;
      j--;
      checkSecDiag(i,j,count,col,board);
      return count;
  }
  </code></pre>