Comments

Java provides three styles of comments:

/* This is a
   multiline comment. */

// This is a single-line comment.

/** This is a
    multiline javadoc comment */

The first comment style supports traditional C-language comments. All text that appears between /* and */ is treated as a comment. Comments of this style can span multiple lines.

The second comment style supports single line C++ comments. All text following the // until the end of the line is treated as a comment.

The third comment style is used by the javadoc documentation generation tool. All text between the /** and */ is treated as a javadoc comment. javadoc comments can span multiple lines. You do not need to know about javadoc on the certification exam. However, if you are interested, ...

Get Sun Certification Training Guide (310-025, 310-027): Java™ 2 Programmer and Developer Exams now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.