Skip to content

Latest commit

 

History

History
16 lines (13 loc) · 345 Bytes

File metadata and controls

16 lines (13 loc) · 345 Bytes

Declaration

Declaring a multi-dimensional array is similar to declaring a normal array.

The difference is that instead of only one [] following the type declaration, you add an extra [] for each extra dimension.

// 2d array
int[][] grid;
// 3d array
int[][][] cube;
// 4d array
int[][][][] hypercube;
// ... and so on