The most important coding standard is always the one favoured by whoever will be paying you for the code. People have plenty of differing opinions about the details of coding standards, and arguments can get quite heated. The bestthing is to learn to be flexible and adopt whatever coding standard is preferred for a particular project. That said, the Cattle Drive coding standard mentioned above is as good as any, and making sure your own "learning" code follows that standard is a good way to learn to follow standards generally.
We found that the aura of authority given by having a real book helped. I bought Scott Ambler's Elements of Java Style for everybody on the team, and published a very short list of exceptions. If your team all uses the same IDE, get as much of your style into the code formatter as possible. I use the formatters in Eclipse and Visual Age often. It's nice to type or refactor at maximum speed without worrying about indentation and alignment. Finally, if you want to go all the way on this, look into an automated style checker. JTest is one example. I find them way too finicky about unimportant things, but it might be just the thing to bring a team into line. [ January 01, 2004: Message edited by: Stan James ]
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
Hi All, I am replying late but I have gonbe through a very good of Java coding standard its Elements Of Java Style Author Al Vermeulen And we need to follow standard anywhere whereever we are going to write codes even its just for testing. thanks Anurag