Are there any widespread, modern Java coding conventions?
Posted
by brianegge
on Stack Overflow
See other posts from Stack Overflow
or by brianegge
Published on 2009-09-01T23:50:18Z
Indexed on
2010/05/20
9:30 UTC
Read the original article
Hit count: 408
Sun's "Code Conventions for the Java Programming Language" was last updated April 1999. Ten years later a lot has changed in the language, as well as general usage patterns. Are there more up to date, widely adopted standards?
Most guidelines omit specifying file encoding and line endings. Sun recommends mixed tabs and spaces. The Eclipse IDE defaults to Eclipse's standard, which is tabs only. The Maven style guide is spaces only. Many style guides, such as JBoss, follow Sun's guidelines, but prefer K&R braces instead of OTBS. Each Apache project has it's own style guide, with slight differences between each one.
© Stack Overflow or respective owner