In Java we try not to read the source code, I may not have the source code. But I NEED to know how to use that code. I need to know: the class name the package name the method name the method parameters the return value form the method any exceptions thrown by the method so Java created a neat concept, put you documentation into the source code, then run a tool to generate the Docs this way anytime you change the source, I can update the docs automatically to add source level documenttion, we use the JavaDoc comments: /** here I code my doc comments, I can include HTML tags because the docs are gnerated as HTML pages */ ----------------------------------------------- JavaDoc Rules and Best Practices I SHOULD (the IRS requires it) document all public classes/methods/fields/etc the JavaDoc comment goes before the code it is commenting I can use older style HTML, I prefer newer style HTML itallics bold
java source code
-----------------------------------------------------------------------------
JavaDoc Best Practices:
1) the first line of the docs is the summary, and it needs to be a sentence
(with punctuation), the summary shows up in the Overview or Package docs
2) add a tag
to keep source code formated
4) use HTML list tags