aspose file tools*
The moose likes Cattle Drive and the fly likes Question on handling of braces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "Question on handling of braces" Watch "Question on handling of braces" New topic
Author

Question on handling of braces

Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Marilyn, Paul ...
The Cattle Drive style guide states that braces should appear on seperate lines

But the style guide on Sun's site uses the following style:

My question is, eventually I want to write the SCJD exam. If I've trained myself to follow the Cattle Drive styles; will I be penalized if I use them on the Developer's exam?
Either of you know?
Thanks


------------------

Jane Griscti
Sun Certified Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe


Jane Griscti
SCJP, Co-author Mike Meyers' Java 2 Certification Passport
Peter Tran
Bartender

Joined: Jan 02, 2001
Posts: 783
Jane,
Great question. My answer would be "When in Rome..."
Seriously, if Cattle Drive prefers the braces to line up then critique the code using that convention. For the SCJD, I would go with what SUN's coding convention. They can't penalize you for using their coding convention, but they can if you use anything else. Why give them a reason to mark you off?
I have an editor (Visual Slickedit) with a code beautifier that will allow me to convert between the two styles.
-Peter
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20729
    ∞

What Peter said.
I also use Visual SlickEdit. It does a nice job on those sorts of changes, but there will probably be more changes than that.
I've also heard that there are two style guide's at Sun, although I have not searched for the second.
As a professional, you need to be prepared for any style guide you are presented with.
Both my style guide and the Sun style guide will prep you for the most important stuff.


permaculture Wood Burning Stoves 2.0 - 4-DVD set
mike fleischer
Greenhorn

Joined: Jan 15, 2001
Posts: 1
with visual slick edit can you cut and paste keeping the same spacing that is wanted for submitting assignments.
Jane Griscti
Ranch Hand

Joined: Aug 30, 2000
Posts: 3141
Thanks guys ... I tend to be habit prone; obviously that's a habit I'll have to break

------------------

Jane Griscti
Sun Certified Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe
paul wheaton
Trailboss

Joined: Dec 14, 1998
Posts: 20729
    ∞

Mike,
yes.

That's how I sent the solutions.
 
wood burning stoves
 
subject: Question on handling of braces