In the book by Kathy Sierra and Bert Bates "Sun Certified Programmer and Developer for Java 2", in the Developer section, chapter 11, Coding Standards, p 579, they say
The opening brace for classes, interfaces, constructors, and methods should occur at the end of the same line as the declaration. The closing brace starts a new line by itself, and is indented to match the beginning of the corresponding declaration.
For flow control (ifs and whiles, etc):
Your flow control blocks should always be enclosed in curly braces. There are places where the compiler will let you get away with not using curly braces, such as for loops and if tests with only one statement in the body, but skipping the braces is considered uncivilized ...snip... For the exam, always use curly braces...snip...- pin this baby to your wall!
i always postponed the coding convention issue and thought that i would do it right before submission. while developing, i just used the settings of my IDE with braces on new line and i used underscores as prefixes for instance variables. though this approach is quite consistent (my IDE even reformatted the original code) it is not at all what sun recommends. as you can probably guess, i forgot to do the formatting later i received my result last week (144/155) and fortunately, i did not get any deductions in the coding standards section whatsoever (lost 11 points in the docs ) although i don't really like sun's standards, i strongly believe that the assignment is not the right place to be bullheaded -- as i said, i didn't do it on purpose, i just forgot
FYI -- JBuilder8 lets you "import" different formatting styles so when you're writing code it "auto-formats" it for you. They've got one for Sun's coding conventions, though I haven't gone through to verify everything (yet) it sure looks like they do a lot of it.
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)