Check out example codes for "declare matrix in java". It will help you in understanding the concepts better.

Code Example 1

int[][] arr = new int[m][n];

Code Example 2

int[][] multi = new int[5][];
multi[0] = new int[10];
multi[1] = new int[10];
multi[2] = new int[10];
multi[3] = new int[10];
multi[4] = new int[10];

Learn ReactJs, React Native from akashmittal.com