0

What is documentation comment and where it is used in simple language

7th Nov 2016, 7:56 AM
Prafull Singh
Prafull Singh - avatar
2 Respostas
+ 2
documentation comment if used to generate java docs. format : /** * * * */ various annotation are used with java doc comment. example: /** * This method is used to add two integers. *This is a the simplest form of a class *method, just to * show the usage of various javadoc Tags. * @param numA This is the first paramter to addNum method * @param numB This is the second parameter to addNum method * @return int This returns sum of numA and numB. */ public int addNum(int numA,int numB){ rerurn A+B; } see at. https://www.tutorialspoint.com/java/java_documentation.htm?_e_pi_=7%2CPAGE_ID10%2C9333791483
7th Nov 2016, 9:05 AM
Harish Nandoliya
Harish Nandoliya - avatar
+ 1
Documentation comment serves to guide users of your code (and yourself) about anything you wish to guide to or to be guided about. In Python, for instance check out PEP 257, docstrings. These comments are awesome to speed up code understanding and therefore, reuse.
7th Nov 2016, 9:12 AM
Fernando Soares
Fernando Soares - avatar