For some reason, in IntelliJ (if that matters), when I try to initialize my 2D arrays, only the first box gets initialized for the size that I am specifying. i.e.
int[][] grid = new int[9][9];
and when I run through with the debugger, it shows that I've created an array that is int[9][]. Does anyone know what I am doing wrong? could it be that I need to update something? anything helps. Thank you.
3 Answers
It is just a debugger representation.
It always works fine.
It do create a two dimensional array in memory.
public static void main(String[] args) {
int[][] grid = new int[9][9];
System.out.println(grid.length);
System.out.println(grid[0].length);
}
This code will always return dimensions properly as:
9
9
What you might get in a debugger is something like this - where definitely is not written int[9][9] what you are expected, however this is a representation only - there is nothing with correctness.

Comments
Please post complete code, what exactly you have written and debugging.
Restart your IDE and check once with below code.
public static void main(String[] args) {
int[][] grid = new int[9][9];
int value = 10;
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
grid[i][j] = ++value;
}
}
for (int i = 0; i < 9; i++) {
for (int j = 0; j < 9; j++) {
System.out.print(((j == 0) ? "" : ", ") + grid[i][j]);
}
System.out.println();
}
}
Note: IDE may misbehave too or might be responding late.
gridis anint[9][], i.e. an array of length 9 ofintarrays. Each of the 9 subarrays can have different lengths, so the debugger cannot show anything for the second[].forloop.int[9]s, becauseint[9]is not a type,int[]is.