You can add comments to a Java language program in three ways.
// Comment Tex
The compiler ignores everything from the // to the end of the physical line.
/* Lots of documentation */
The compiler ignores everything between the /* and the */.This type of comment can span multiple physical lines.
/** Official Documentation */
The compiler ignores everything between the /** and the */. Like the preceding comment type, this one can span multiple physical lines. The difference between this type of comment and the last one is that programs like javadoc (from JDK) can read in the latter. This type of comment usually describes the purpose of a class or method.
Team-Fly |