C. Java Code Conventions
THE FOLLOWING ARE SOME OF THE GUIDELINES I like and use from the Code Conventions for the Java Programming Language prescribed by Sun on the java.sun.com website. (Note:There are many more conventions recommended by Sun, so be sure to visit this website.)
- All source files will have a beginning Javadoc comment.
- The first line of code in the source file will be the package statement followed by any import statements.
- Package names should begin with a lowercase top-level domain name (for example, com. or edu.).
- Class and interface names should be nouns and should use a mixed case with each word being capitalized (for example, EmployeeHours).
- All class files should have the following in the order listed here: