Java Programming
Basic coding skills
Code comments
- Comments are used to help document what a program does.
- To code a single-line comment, type // followed by the comment. A single-line comment that's coded after a statement is sometimes called an end-of-line comment.
- To code a block comment, type /* at the start of the block and */ at the end. You can also code asterisks to identify the lines in the block, but that isn't necessary.
A block comment that could be coded at the start of a program /* * Date: 6/27/2011 * Author: Hann So * Purpose: This program displays Hello World. */