Coding Standards

Date: 1/28/2002

Commenting with JavaDocs

The general format for JavaDocs is:

/**
 * Description
 *
 * @tag
 *
 class or method signature, or variable declaration.
 

 The tags you will be required to use are:

General Comments

Single-line or multi-line comments may be added for clarity.  Comments should have a blank line before them and be directly above the code they are commenting.

// Single-line comment
<code being commented>

/*
  Multi-Line
  Comment
*/
<code being commented>

Indenting

Rule of thumb:  if a line or lines of code belong inside of another structure (class signature, method signature, code block), then indent one more tab.

White Space

Leave a blank line to separate logical sections of your code. 

Naming Conventions

Adhere to the naming conventions for Classes, Methods, and Variables as discussed in earlier lectures.

Package names are always lower-case.