0

i would like to keep code like this (and use autoformat):

try { System.out.println("oh"); } catch(Exception e) {}
try { System.out.println("hey"); } catch(Exception e) {}

but netbeans reformats to this:

try {
    System.out.println("oh");
} catch (Exception e) {
}
try {
    System.out.println("hey");
} catch (Exception e) {
}

is there any way to prevent this? to keep try/catch, or at least to keep {} on same line?

stuart
  • 1,785
  • 2
  • 26
  • 38

1 Answers1

0

This question has the following answer:

Look in Tools -> Options -> Editor -> Formatting

For further reference: 'http://forums.netbeans.org/topic8932.html'

Community
  • 1
  • 1
craned
  • 2,991
  • 2
  • 34
  • 38