Multi Line Comments | Heaton Research

Multi Line Comments

Get the entire book!
Java for the Beginning Programmer

You can also create a multi line comment. These comments can span for many lines and allows completely free-form text to be inserted into the comment. A multi line comment begins with /* and ends with */. The following shows an example of a multi line comment.

/*
Line 1
Line 2
Line 3
*/

Both single and multi line comments greatly add to the readability of your program -- both for yourself and other programmers.

Copyright 2005-2008 by Heaton Research, Inc.