0

Need of Documentation comments

i don't get the concept of documentation comments. i mean for what purpose it need

20th Jun 2017, 2:14 PM
Aryaman
2 odpowiedzi
+ 4
It was a mystery to me also, until I started Android development. When you create classes for your own reference, and there are not much code inside it, you need not put comments. But when you are making classes which other people will also use, like the classes in Android os, developers need to know that what kind of arguments the functions in the class take and what data type they return. They'll code their app accordingly. example: System.out.println() what arguments this function takes? You'll be knowing that since this is the first lesson, but how did the first ever Java programmer know that? He read the comments and understood that the function takes one argument of string data type. you should write comments so that the people who use your classes and code in the future know what arguments they need to pass and what return type they should expect. Hope it helps. Good luck coding!
20th Jun 2017, 3:03 PM
Snehit Sah
Snehit Sah - avatar
+ 1
Thank you snehit
20th Jun 2017, 3:35 PM
Aryaman