This helps the reader quickly skip between parts. Don't put anything on the same line after an opening curly brace. Doing so makes it difficult to insert new code at the beginning of that block. Don't put anything on the same line before a closing curly brace. Doing so makes it difficult to insert new code before the end of the block.
Some people prefer to put opening curly brace on a line by themselves.
You'll see this style in Java Plus Data Structures . Much of the time, I prefer to put the opening curly brace after the thing that is being opened. This makes it easier to understand the control flow of your program. Hence, you will often need to reformat or break long lines. Try to indent the continued line in such a way that makes the relationships clear.