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 Developer Certification (SCJD/OCMJD) and the fly likes A old question: shall we write comment for the private methods and variables? 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 » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "A old question: shall we write comment for the private methods and variables?" Watch "A old question: shall we write comment for the private methods and variables?" New topic
Author

A old question: shall we write comment for the private methods and variables?

Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Hi,
Shall we write comment for the private methods and variables?Thank you for reply.
Best,
Damu
Philippe Maquet
Bartender

Joined: Jun 02, 2003
Posts: 1872
Hi Damu,
It's not mandatory. I know that some people did (Andrew did for sure), while others just documented public ones as stated in the instructions. I think I'll do something between both : document everything in my db, net and util packages while being far less talkative in the GUI part. Would it make any sense to document a private JButton instance named bookButton with something like "This is a button which - when clicked by the user - will call a book method" ?!
Best,
Phil.
Nicholas Cheung
Ranch Hand

Joined: Nov 07, 2003
Posts: 4982
I have written comments for all components.
However, I wanna ask, when I submit the Javadoc with the assignment,
should I generate all of them?
or ONLY public and protected methods and variables?
or even ONLY public methods and variables?
Thanks.


SCJP 1.2, OCP 9i DBA, SCWCD 1.3, SCJP 1.4 (SAI), SCJD 1.4, SCWCD 1.4 (Beta), ICED (IBM 287, IBM 484, IBM 486), SCMAD 1.0 (Beta), SCBCD 1.3, ICSD (IBM 288), ICDBA (IBM 700, IBM 701), SCDJWS, ICSD (IBM 348), OCP 10g DBA (Beta), SCJP 5.0 (Beta), SCJA 1.0 (Beta), MCP(70-270), SCBCD 5.0 (Beta), SCJP 6.0, SCEA for JEE5 (in progress)
Dave Knipp
Ranch Hand

Joined: Oct 14, 2003
Posts: 146
I think you only need to generate public and protected methods and vars b/c thats how sun does it, they never include any private members in the api do they?
Dave


SCJP 1.4, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, IBM Certified Solution Developer -WebSphere Studio V5.0
Bigwood Liu
Ranch Hand

Joined: Feb 26, 2003
Posts: 240
Hi friends, Thank you.
I prefer to doc only the public/protected/friendly member. After all it is more simple . Is there anyone pass the exam with such doc?
Best,
Damu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: A old question: shall we write comment for the private methods and variables?
 
Similar Threads
B&S: What types do you comment with javadoc?
private variables, public getter and setter. Why?
private varibles in servlet
Is it a great technique to reduce the documentation?
question on overriding