Java Programming
Coding Style and Convention Benefits

 

[ Material adapted from Code Complete by Steve McConnell, © 1993 by Microsoft Press, chapter 32. ]

Official Java coding conventions have evolved from earlier ones over many years.  They just work!  Nearly all Java code written today follows the standards and style for coding Java programs, found at Oracle's (formerly Sun's) website.  You should read this and follow it.

Your Program n.  A maze of non sequiturs littered with clever tricks and irrelevant comments.  Compare with My Program.
My Program n.  A gem of algoristic precision, offering the most sublime balance between compact, efficient coding on the one hand and fully commented legibility for posterity on the other.  Compare with Your Program.
– Stan Kelly-Bootle