Reputation: 33405
Netbeans when formatting Java code seems to insist on putting the closing brace of an array initializer on the same line as the last element:
String[] names = {
"a",
"b",};
Is there a way to get it to leave the closing brace on a new line...
String[] names = {
"a",
"b",
};
... without messing up the way it formats code blocks?
Upvotes: 2
Views: 276
Reputation: 32831
It seems that it keeps the closing brace on the next line if you remove the last comma.
Upvotes: 1