+ 1
What is documentation comment?
please explain in easy lang
3 Respuestas
+ 1
/*Its when you want to put a comment inside your code explaining what its doing like this*/
String x = "your comment wont affect this";
System.out.println(x);
// for single lines
/* for
two line*/
/* just copy and paste this whole message into your play ground to understand better*/
+ 1
the tool javadoc looks for
/**
* @args int a, SomeClass b
* @return SomeOtherClass c
* a brief description of what the function does
*/
and generates the documentation that you would see on IDE pop up or Oracle websites for documentation.
0
When you see some java output at console, sometimes you find it written in grey color. That text is actually the one inside the documentation comments /**.....*/. The text within these comments actually get printed on the console to make the documentation user friendly.