A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is also called an “array of arrays”.
You can initialize a jagged array as –
int [ ][ ] myArray = new int [2][ ] {new int [ ]{10,11,12}, new int [ ] {8,9,10,11}};
Where, myArray is an array of two arrays of integers – myArray [0] is an array of 3 integers and myArray[1] is an array of four integers.
[amazon_link asins=’007070368X,1787287041,9351190900,8120349172,B01BKKOQ5I,B011V135LM,B078NRPJT6,B011V10Z2O|1840787198,B016Z18MLG,0985580135,1119428114,1491988533,B075ZY65F2,B0036DUP1M,B00RCIU1S4′ template=’ProductGrid’ store=’desibanjara22-21|desibanjaraco-21′ marketplace=’IN|UK’ link_id=’14765420-93b6-11e8-b29f-ebea178d2d3b’]