Java Specifics : space and curly braces

A Java source program is composed of white space, comments, declarations, and statements.


{
	White space is a very important part of any Java program    
	{
		has no effect on the code's meaning
		enhances readability and communicates structure

		includes : spaces, tabs, and new lines.
		typically, tabs or indention set off blocks of code
		new-lines separate statements
	}
}
 

There are lots of different"rules and conventions" on using white space and curly braces.

Adopt a consistent style !

Make sure that readers could easily find beginning and end of your blocks

A Java source program is composed of white space, comments, declarations, and statements.
White space is a very important part of any Java program. While it has no effect on the meaning of the code, white space, more than any other factor, contributes to the readability and signals the structure of a code fragment. White space includes, spaces, tabs, and new lines. Typically, tabs or indention is used to set off blocks of code, and new lines are used to separate statements. There are no hard-fast rules how and when to use white space, all I suggest is that you adopt a consistent style.