I\'m a bit puzzled by the number of developers I see writing methods and classes with curly braces below the class name or the method. What convention are they following?
<I prefer the second convention because the closing bracket will be directly below the opening one, so it's easier to find.
The first convention saves precious space. The bracket matching is done by the editor anyway.
The second convention is also the default indentation style of Visual Studio (and therefore rather common) for C#
This is a standard style convention called the ANSI style. It's common in other languages besides Java, as well.
The latter looks like the Allman indent style which is quite popular in C++ but I haven't seen it used often in Java.
See: http://en.wikipedia.org/wiki/Indent_style
Syrion has identified it as the ANSI style, Sun follows the K&R style of brace placement.
Tangent: and now I know that accursed style is called Whitesmiths style