Salih Erikci
Salih Erikci

Reputation: 5087

Netbeans curly braces formatting

When i am declaring a new method in netbeans, i do as follows:

$cursor is used to mark the position of the cursor

public void inc(){$cursor}

Then i hit enter, the output is as follows:

public void inc(){
$cursor}

What i want is as follows:

public void inc(){
    $cursor
}

How can achieve this result in netbeans?

Upvotes: 0

Views: 146

Answers (1)

reden
reden

Reputation: 1003

I do this:

public void inc(){$cursor

then hit enter.

In short: You don't type out the second curly brace, it's generated for you together with an extra line break.

Upvotes: 1

Related Questions