Java Comments
java Comments will have the following usages:
- To make a statement or a block of code as non-executable statements. (Comments are ignored by the compiler)
- To describe a program Or a statement Or a block to code (that are useful to other programmers)
On this page
Single Line Comments
// Single line comment
Multi Line Comments
/* Multi line comments*/
Documentation Comments
/** documentation */
This indicates a documentation comment (doc comment, for short). The compiler ignores this kind of comment, just like it ignores comments that use /* and */. The javadoc tool uses doc comments when preparing automatically generated documentation. For more information on javadoc, see the Javadoc tool documentation .