Array initializers appear in two different flavors:
// NEW expression:
x = new String[3][4][] { { { "a", "b" } } };
// Field or local variable initializer:
String[][] x = { { "a", "b" } };
The phrase "wrap before X" means that a line break and spaces appear right before "X", such that "X" is vertically aligned with the first token in the immediately preceding line.
| Name | Description |
|---|---|
| allowMultipleValuesPerLine | Whether multiple array initializer values in one line are allowed. |
| wrapBeforeLCurly | Whether to wrap array initializers before the opening curly brace. |
int[] ia =
{ ...
Default values are underlined.
For a description of the individual values, click them.
String[] x = {
"a", "b", // <= Two values in one line.
"c"
};