Site hosted by Angelfire.com: Build your free website today!
 

User Comment

Three types of comments:

//

Single-line comment

/* ... */

Multi-line comment

/** ... */

Javadoc comment

class HelloWorld {
/**
  This is a javadoc comment. It is a multiline comment unique to Java.
  If you use the javadoc compiler (which comes with Java), it will 
  automatically create HTML-based docmentation for you. The online help 
  that comes with the Sun SDK was created using javadoc comments.
*/
  public static void main (String[] args) {
    System.out.println("Hello World?");
    //Two forward slashes indicate a single-line comment.
    //Notice that each line must begin with the
    //two forward slashes.
 
/*
  This is a multiline comment. It is possible to have multiple lines of code 
  within this block.
*/
  }
}