The CODE: |
Information
about the code: |
/************************************
*Project: Demo for Comments
*Programmer: Mr. Data
*Date: June, 2003
*Program Name: Comments.java
*************************************/ |
All programs should
begin with a comment identifying the purpose of the program and the
programmer. For our course please use the style shown at the
left. |
import java.io.*;
public class Comments
{
public static void main (String[ ] args)
{
System.out.println("Hi"); //message to user
System.out.println("LabOneA");
//assignment
}
} |
Comments can also be placed
within the body of a program to act as documentation. These
comments should be brief and to the point.
This body prints Hi!
on the screen and LabOneA
on the screen. |
/* if you want to
write a detailed comment, and it wraps around the screen, use this
block style of commenting. */ |
The
block form of commenting is used to display lengthy comments that
wrap around the screen. |