0

What is the difference between Multi-line comments and Documentation comments? Why should i use a Documentation comments?

20th Oct 2016, 7:37 PM
Iram
6 odpowiedzi
+ 3
use documentation comments if you need to get a document file containing those comments.
20th Oct 2016, 7:44 PM
nilz
nilz - avatar
+ 1
Documentation comments can be eg. shown by the IDE to tell you what a function is doing. A normal commen, no mather if multi line or not will never be shown... This will be shown... /** * this is function comment * ... */ private void func (){} ...this not. /* * this is no function comment * ... */ private void func (){}
20th Oct 2016, 9:27 PM
Patrick Gae
Patrick Gae - avatar
+ 1
Comments are something that we write in order to explain the code that follows write after/below. While Documentation is a file where we put everything about our code. Why we did it this way and not the other, our comments etc
23rd Oct 2016, 8:22 AM
Elias Papachristos
Elias Papachristos - avatar
0
Thanks all. One more thing, where i put the documentation comments??
23rd Oct 2016, 3:21 PM
Iram
0
also, documentation comments can be used to later export Java documents about your program with all of the needed instruction of how to properly use every class and parameter usage
28th Oct 2016, 11:38 AM
Steve Chavez
Steve Chavez - avatar
0
@Iram - usually above the class (normal comments are usually found throughout the class to give you specific info on what you're doing so that when you look back at the code it acts as a reminder or saves other developers from having to spend too much time researching instead of developing)
28th Oct 2016, 11:42 AM
Steve Chavez
Steve Chavez - avatar