January 2003
Beginner to intermediate
1200 pages
23h 42m
English
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 ...