Hi all Since now I've used the array declaration form of: Also in most Java books I've seen the follwing signature for the main methode : . But now I found the follwing in Suns Java Coding Style Guide from Achut Reddy:
What notation are you using? Is this realy an issue? Thanks for all response. Cheers Stef
[ July 13, 2004: Message edited by: Stef Widmer ]
[ July 13, 2004: Message edited by: Stef Widmer ] [ July 13, 2004: Message edited by: Stef Widmer ]
In Sun's Code Conventions for the Java Programming Language I don't find anything on the declaration of arrays. In my opinion you should always have a Style Guide and for the certification assignment I would adhere to Sun's Style Guide. As far as your declaration question is concerned: The most important thing is, that your array declarations are consistent (I personally prefer to ).
I understood the convention to be placing the brackets after the type for readability issues - e.g. int myMethod() is a lot more difficult to read than int myMethod.
As far as I know, allowing the brackets after the variable is really a concession for those migrating from C.
Joined: Jun 16, 2004
Hi, the PDF I've found comes from SUN's site, here's the URL: Java Coding Style Guide . You'll find the array declaration in section "8.1.3 Array declarations". Perhabs it's an out dated version. But why'is it than still on Sun's site? However, it's maybe not worth spending to much time on this issue...