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

Code Example 1

int[][] numbers = new int[7][];

// row 0 gets 5 columns
numbers[0] = new int[5];
// row 1 gets 11 columns
numbers[1] = new int[11];
// etc...

Learn ReactJs, React Native from akashmittal.com