I'm curious. Why is so much code in this forum formatted like this
if (something)
{
do something
}
else
{
do another thing
}
rather than
if (something) {
do something
} else {
do another thing
}
The first version is harder to read and takes up more lines, which means more blocks spanning more than 1 window vertically.
The second version is easier to read, more compact, and is the style consistently used in the Java Language Specification, the Sun/Oracle tutorials, and the source code of the API itself.
So why do people persist in using version 1?