Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

does it enforce this code convention

 
leon liu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
as topic
I like code as below:



but some book said must to be below:


whice one is the right rule??

Thank for Advance...

leon

[ February 23, 2006: Message edited by: leon liu ]
[Andrew: Put code between [code] and [/code] UBB tags]
[ February 23, 2006: Message edited by: Andrew Monkhouse ]
 
Eiji Seki
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first one is according to the standard. But be careful, since you need to put a space before the parenthesis:



Please read carefully the coding standards document
http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
[ February 23, 2006: Message edited by: Eiji Seki ]
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
those differences may seem ridicolous. but should you ever start developing software in a team, or try to understand third-party code, you'll immediately realize the benefits of coding conventions...

http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html
 
Jan Groth
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oops, i didn't see that the link was already posted...
 
Aruneesh Salhotra
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use eclipse to code or open your code/project in that. ctrl-shift-F does the job for you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic