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 JavaDoc 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 "JavaDoc" Watch "JavaDoc" New topic


Vengan Krish
Ranch Hand

Joined: Mar 05, 2005
Posts: 32
My assignment spec says the final submission must have 'JavaDoc documentation for all classes and interfaces you are submitting'. Here are my questions.
1.Many or most of my classes don't have to be public. Should I make all classes public and include doc comments, to meet the above criteria?
2.I have very few public methods in my classes. They all have package level access or private access. Should I include doc comments for such methods? They are not going to be generated anyway in the javadoc.

Advanced thanks for your response.

Steve Taiwan
Ranch Hand

Joined: Jul 01, 2003
Posts: 166
You don't need to make all classes public. However, I use Javadoc for public, protected, package and private level methods andattributes.

Steve Taiwan<br />SCJP 1.2, SCJD 1.4, SCWCD 1.3, SCBCD 1.3, OCP 8i DBA, SCEA
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357

I also did not make classes public that did not need to be (I think that would be a bad idea that will probably cost you points in the OO or General Considerations categories).

As a habit, I added comments to all methods, even private ones and to all fields that had package level or better visibility. I generated the javadoc using the -package flag. I got the full score in the documentation category, so I guess it was OK.


Vengan Krish
Ranch Hand

Joined: Mar 05, 2005
Posts: 32
Thanks to all who replied. I'll got the same way as you guys.

I agree. Here's the link:
subject: JavaDoc
Similar Threads
B&S: What types do you comment with javadoc?
Disallowed to use private inner classes?
Questions regarding JavaDoc for URLyBird (1.1.2)
Javadoc documentation??
Java Docs