The Java® Language Specification, Java SE 7 Edition, Fourth Edition
by James Gosling, Bill Joy, Guy Steele, Gilad Bracha, Alex Buckley
3.7. Comments
There are two kinds of comments.
• /* text */
A traditional comment: all the text from the ASCII characters /* to the ASCII characters */ is ignored (as in C and C++).
• // text
An end-of-line comment: all the text from the ASCII characters // to the end of the line is ignored (as in C++).
Comment: TraditionalComment EndOfLineCommentTraditionalComment: / * CommentTailEndOfLineComment: / / CharactersInLineoptCommentTail: * CommentTailStar NotStar CommentTailCommentTailStar: / * CommentTailStar NotStarNotSlash CommentTailNotStar: InputCharacter but not * LineTerminatorNotStarNotSlash: InputCharacter but not * or / LineTerminatorCharactersInLine: InputCharacter CharactersInLine InputCharacter ...
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.
Read now
Unlock full access