0
Pls tell how documentation comments are different from multiline comments
6 Respuestas
+ 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.
+ 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
*/
+ 1
Jayakrishna thank you😊
0
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.
0
Multiline comments are / can be for documentation too. You need to be more precise regarding language and documentation framework.
0
Multiline documentation comments are supported by many languages without the necessity to declare it in each line.