rwallace
rwallace

Reputation: 33405

How to get Netbeans to leave array initializer closing brace on new line

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

Answers (1)

Maurice Perry
Maurice Perry

Reputation: 32831

It seems that it keeps the closing brace on the next line if you remove the last comma.

Upvotes: 1

Related Questions