I write this code for solving Sudoku game and when I try to set data in function inside the array it will error, here is the code:
public static boolean CheckRowColumnBox(int data,int b,int[][] matrix,int r,int c){
if(CheckRow( data, r, matrix )
&& CheckColumn(data, c, matrix)
&& CheckBox(data, b, matrix,r,c)) {
matrix[r][c]==data; //error here
return true;
}
return false;
}
why??? how can I solve it, where i can define r and c