String[][]
is an array of arrays of Strings. Sometimes that's called a two-dimensional array.
An array of X
can be created using new X[] { instanceOfX1, instanceOfX2, instanceOfX3 }
.
Since X
in this case is String[]
you could create a String[][]
like this:
new String[][] { new String[] { "a", "b" }, new String[] { "x", "y" }, new String[] { } }
Note that the inner arrays don't need to be of the same size (this is called a jagged array).