15
1
using System;
2
3
public class Program
4
{
5
public static void Main()
6
{
7
string[][] jaggedArray = new string [2][] {
8
new string[] {"banana", "mango"},
9
new string[] {"orange", "apple", "watermelon"}
10
};
11
12
Console.WriteLine(jaggedArray[0][1]);//accessing elements of jagged array
13
Console.WriteLine(jaggedArray[1][2]);
14
}
15
}
Cached Result
mango
watermelon
watermelon