Pls tell how documentation comments are different from multiline comments

30th Jul 2020, 5:55 PM
Harshal - avatar
6 Answers
+ 3
In Python there is an equivalent called docstring. You can use docstrings in functions and classes and the docstring content will be shown when you run: help("function/class name") I think documentation comments in Java could have a similar purpose.
30th Jul 2020, 11:27 PM
Seb TheS
Seb TheS - avatar
+ 1
In java, documentation comments can be more useful in documenting the projects.. There is a javacdocumentation command, that create html file in the corrent directory about the code and you read entire API about document to simply know about the program instead of going through a large number of code lines... This is best feature of documentation comments.. Multi line comments ex: /* This Is Mutiline comments */ Documentation comments : /** This is documentation comments, provide Useful API here */
30th Jul 2020, 6:10 PM
Jayakrishna 🇮🇳
+ 1
Jayakrishna thank you😊
30th Nov 2020, 2:11 AM
Krishna - avatar
Documentation comments are only used for document purposes like when you want to show them in orginal code and they also need to be explicitly declared every time when the line is changed. On the other hand, Multi-line comments can also be shown in resulting code after all the compression and other stuff is done.
30th Jul 2020, 6:03 PM
Lakshay Mittal
Lakshay Mittal - avatar
Multiline comments are / can be for documentation too. You need to be more precise regarding language and documentation framework.
30th Jul 2020, 6:04 PM
Sandra Meyer
Sandra Meyer - avatar
Multiline documentation comments are supported by many languages without the necessity to declare it in each line.
30th Jul 2020, 6:09 PM
Sandra Meyer
Sandra Meyer - avatar