+ 2

What is documentation comment in java??? Where it is used???

31st Jul 2017, 1:09 PM
LALIT MAKAR
5 Réponses
+ 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.??
31st Jul 2017, 4:01 PM
LALIT MAKAR
+ 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 😎
31st Jul 2017, 1:14 PM
Art456
Art456 - avatar
+ 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!"); } }
31st Jul 2017, 1:17 PM
Art456
Art456 - avatar
0
i think it is used by javadoc. javadoc will automatically create documentation of your work based on those comments.
1st Aug 2017, 3:22 AM
gensan
0
You suck
1st Aug 2017, 10:12 PM
Nandan Praveen
Nandan Praveen - avatar