This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Need Help writting Java Doc Comments Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Need Help writting Java Doc Comments" Watch "Need Help writting Java Doc Comments" New topic
Author

Need Help writting Java Doc Comments

Michael Hubele
Ranch Hand

Joined: Dec 17, 2005
Posts: 182
I have to write some java doc comments but I am not sure what to put for a couple things.

like for the public class I am unsure how to describe it.

like if I have public class PhoneNumber

what should I put there for the java doc comments.
This is what I usually put in it.

/**
* This is used to define a class called PhoneNumber
* @Author Michael Hubele
*/

I am not sure what else I would put in there.

Also I am not sure for the public static void main(String [] args)

I have this
/**
* The program makes a phone number at random.
* @param args - This takes in array of arguments from the user.
*/

I am also not sure what to put in there either and is that correct what I am saying about the param args? Since we need to have that in there and thats all I could think of puting in.

Thats all the questions I have for now.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24183
    
  34

Here is a guide to writing Javadoc comments. There is a lot of information here. The guide includes technical information, but more importantly, it includes style information and content advice. If you read all of this and pay attention, it will answer all your questions.


[Jess in Action][AskingGoodQuestions]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need Help writting Java Doc Comments
 
Similar Threads
java:12: cannot find symbol
ejb 3 annotations
illegal start of an expression
Javadoc
Printing in Array in Ascending order