0
Can anyone tell me What does jagged array do?
I think that it's act like a 2D array, is it true?
1 Antwort
+ 2
it is, but its unique in that the second dimension can have a varying quantity of keys.
example
i[4][] is the array
i[0][3] can be the first array
i[1][5] is second
i[2][1] is third and
i[3][7] is fourth
a visual example could be i is a mother (key) with a name (value). each mother has a different amount of children (key) with their own names (value). that's probably the easiest way i can think of describing a jagged array