1. What is the Heap? When your Java program runs and sees the keyword new, it carves out space in a big memory warehouse called the Heap. Every object placed there gets a unique location tag like @0x2A10 (called a reference).
2. Surprise: Java doesn't actually have "true" 2D grids in memory! Instead, int[][] mat is a 1D spine of arrows (left column). Each slot mat[i] holds a reference arrow pointing to a separate 1D row of numbers (int[]) on the right.
3. Why does this matter? Because each row is its own separate array object in the Heap, mat.length counts how many rows exist, mat[i].length counts how many numbers are in row i, and rows don't even have to be the same length!
// Output appears here when you step through or play a loop...