+ 2
What is documentation comment in java??? Where it is used???
5 Answers
+ 2
ok ty for answer .
but still im in doubt that where it is used.. as we are familiar with single line comments as well as multiline comments but what is use of documentation??? also in solo learn java it is written that it is used in html format all that.??
+ 6
/* text */
The compiler ignores everything from /* to */.
//text
The compiler ignores everything from // to the end of the line.
/** documentation */
This is a documentation comment and in general its called doc comment. The JDK javadoc tool uses doc comments when preparing automatically generated documentation.
it used when you want to tell or comment something in your code and not output an error đ
+ 6
Example :
/**
* The HelloWorld program implements an application that
* simply displays "Hello World!" to the standard output.
*This will not display and not disturbing the cpde
* @author
* @version 1.0
* @since
*/
public class HelloWorld {
public static void main(String[] args) {
/* Prints Hello, World! on standard output. */
System.out.println("Hello World!");
}
}
0
i think it is used by javadoc.
javadoc will automatically create documentation of your work based on those comments.
0
You suck