new int[][] { { 1, 2, 7 }, { 3, 4, 5 } }
is an array literal. Just as 1
means "integer 1" and "foo"
means "String "foo"
", new int[][] { { 1, 2, 7 }, { 3, 4, 5 } }
means "array of arrays of integers { { 1, 2, 7 }, { 3, 4, 5 } }
".
When you have an array, you can index it. Let's call our anonymous array of arrays of integers harvey
:
int[][] harvey = new int[][] { { 1, 2, 7 }, { 3, 4, 5 } }
Now harvey[1]
is "array of integers { 3, 4, 5}
", and if we index that again, harvey[1][2]
is the third value of that array, 5
.
But wherever you could use harvey
, you could just substitute its value; that is the expression you have.