You didn't specify a size for your array.
int[][] puzzleBoard = {};
should be int[][] puzzleBoard = new int[10][10];
There is no need to initialize your array with a for loop or line by line if you're only filling it with 0.
Then arrays are 0 base indexed. So the first element will be at position [0][0]
and the last one at position [9][9]
.
You could also remove your two variables rows
and columns
.
Finally, you should modify your for loop to start from 0.
for (i = 0; i < puzzleBoard.length; i++){
for(j = 0; j < puzzleBoard[i].length; j++){
System.out.print(puzzleBoard[i][j] + " ");
}
System.out.println( "" );
}
To learn more about arrays in Java, I advise you to read this.