• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

does it enforce this code convention

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Ranch Hand
Posts: 456
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
oops, i didn't see that the link was already posted...
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
use eclipse to code or open your code/project in that. ctrl-shift-F does the job for you.
 
You've gotta fight it! Don't give in! Read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic