Just a couple of minor things:
In Java, opening brace
{braces should be put at the end of the same line and not on it'sits own line.Instead of using break
breakand aboolean sudokuStatusin yourcheckArrayStatusmethod, use areturnstatement:while (i < 9) { if (rSumArray[i] != 45 && cSumArray[i] != 45 && rSumArray[i] != 45) { return false; } i++; } return true;Since the above loop is just doing a fixed-length iteration, replace
while (i < 9)withfor (int i = 0; i < 9; i++)9 is a "magic number" in your code. Let's say you wanted to change the Sudoku grid size (there are 4x4 Sudokus as well, - in fact, almost any size is possible). If you wanted to change the size, you'd have to replace the value in many different places. Instead use a constant.
public static final int GRID_SIZE = 9;Now, instead of writing
9you can useGRID_SIZE
#And one major thing:
And one major thing:
Just because some numbers sum up to 45 doesn't mean that it's valid in a Sudoku group!
Consider these numbers: 1, 1, 1, 1, 5, 9, 9, 9, 9. Do they some up to 45? Yes. Would it be a valid group/row/column in a Sudoku? NO! This is why @Vogel612's solution is a whole lot better.