Can anyone tell me the proper spacing rules. In the assignment tutorial, I see: System.out.println( "Spot is now home" ); } ***Notice the space after the println method parentheses and the string In the style guide, I see: System.out.println("Oatmeal is good and good for you"); ***notice the no spacing between the parentheses and the string. Which is correct, or does it even matter? This is my understanding of the spacing rule: 1 - all identifiers are surrounded with whitespace unless it reduced clarity 2 -note the exceptions in the style guide (methods, arrays, pre and post increment, and casting)
Joined: Dec 10, 2001
I'm whispering so only you will hear this... There would appear to be a couple of inconsistencies regarding the style guide and what is actually expected. Mostly to do with some spacings not addressed in the style guide. A rule that should get you by: If you were to surround all of your String literals with spaces, you would not be in error.