Skip to Content
Real World XML
book

Real World XML

by Steven Holzner
January 2003
Beginner to intermediate content levelBeginner to intermediate
1200 pages
23h 42m
English
Peachpit Press
Content preview from Real World XML

Commenting Your Code

As with JavaScript, you can comment your Java code. Comments serve the same purpose here as they do in XML and JavaScript: They hold descriptive code that explains what's going on in your code. There are two ways to insert comments in a Java program. The first way is to surround comments, especially multiline comments, with the characters /* and */, like this:

					/* This application is designed to display
					the message "Welcome to Java" on the console
					*/

public class ch10_01
{
    public static void main(String[] args)
    {
        System.out.println("Welcome to Java");
    }
}

As with any type of comment, the Java compiler ignores the text in the comment—that is, any text between the /* and */ markers.

As with JavaScript, Java supports a one-line ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Inside XML

Inside XML

Steven Holzner
XML Hacks

XML Hacks

Michael Fitzgerald

Publisher Resources

ISBN: 0735712867Purchase book