Greetings all. I've noticed in 95% of the Java books I have read that the norm for doing curly braces is:
Yes I'm currently reading "Head First Java" and this is where I got the example... Great book so far!!!
According to the Style guide here at Javaranch.com it should be where the beginning and ending curly braces are aligned such as:
I've been coding in PHP for a couple of years now and have always used style standards identical to those here on JavaRanch.com. I'm starting to do some coding in Java now and I'm using the same standards because I'm used to them and I think they make the code way easier to read.
My question is ( finally ), what is the industry standard? Are most business' doing it like the first example which I've seen in many books... or are they doing it like suggested on javaranch? I would hate to get in the habit of coding one way just because I think it is better and have to train myself to code another way because my company prefers it differently. I'd rather train myself now to do the industry standard ( if there is one ).
Thanks in advance for any replies.
-Brock
[ July 21, 2003: Message edited by: Brock Barnes ]
Yes I'm currently reading "Head First Java" and this is where I got the example... Great book so far!!!
According to the Style guide here at Javaranch.com it should be where the beginning and ending curly braces are aligned such as:
I've been coding in PHP for a couple of years now and have always used style standards identical to those here on JavaRanch.com. I'm starting to do some coding in Java now and I'm using the same standards because I'm used to them and I think they make the code way easier to read.
My question is ( finally ), what is the industry standard? Are most business' doing it like the first example which I've seen in many books... or are they doing it like suggested on javaranch? I would hate to get in the habit of coding one way just because I think it is better and have to train myself to code another way because my company prefers it differently. I'd rather train myself now to do the industry standard ( if there is one ).
Thanks in advance for any replies.
-Brock
[ July 21, 2003: Message edited by: Brock Barnes ]