aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Code Style Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Code Style" Watch "Code Style" New topic
Author

Code Style

Alain Huber
Greenhorn

Joined: May 09, 2007
Posts: 5
Hello everybody

I like it better to write code in that fashion:
--------------------------------------------------------------


----------------------------------------------------------
Will I be penalized for doing this the non java way? The code
guidelines from java ranch also see things as I do. Thanks for
the reply

[ November 04, 2007: Message edited by: Alain Huber ]

[ November 04, 2007: Message edited by: Alain Huber ]
[ November 04, 2007: Message edited by: Alain Huber ]
abhishek pendkay
Ranch Hand

Joined: Jan 01, 2007
Posts: 184
as far as i have seen the sun standards, your code should look as


and i am not sure if you will be penalized for that but its always good to follow the coding standards specialy if they are laid down by SUN

[ November 05, 2007: Message edited by: abhishek pendkay ]

[ November 05, 2007: Message edited by: abhishek pendkay ]
[ November 05, 2007: Message edited by: abhishek pendkay ]

The significant problems we face cannot be solved by the same level of thinking which created them – Einstein
SCJP 1.5, SCWCD, SCBCD in the making
Xabier Martija
Ranch Hand

Joined: Jul 18, 2007
Posts: 40
Try to use SUN formatting standard. You may loose some points if you don't follow sun style.

Some IDEs like eclipse provide a very useful automatic formatter, that you can set to follow SUN standard.
Another useful utility is checkstyle, can be downloaded as an pluggin for eclipse.
Musab Al-Rawi
Ranch Hand

Joined: Aug 06, 2007
Posts: 231
Do you know any other tools like checkstyle that can be used for netBeans even better independent of any IDE ?

thanks


SCBCD - SCWCD - SCJD - SCJP - OCA
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41815
    
  62
Originally posted by Musab Al-Rawi:
Do you know any other tools like checkstyle that can be used for netBeans even better independent of any IDE ?


There are plenty: jlint, jcsc, lint4j, pmd and findbugs. All these can be run from within Ant or as standalone applications.

I particularly like FindBugs for its relevant and actionable warnings, and PMD for its extensibility.


Ping & DNS - my free Android networking tools app
Alain Huber
Greenhorn

Joined: May 09, 2007
Posts: 5
Many thanks for the reply's.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Code Style