Javadoc
What we are creating with BigFraction is an applications programming interface (API). This sort of class is something another programmer might use to perform calculations in support of their class.
We are going to document our API so another programmer can be concerned about what our code does and not why it works.
There is a special kind of comment for javadoc; it looks like this.
/**
* This is a javadoc comment.
*/
You can use HTML features in Javadoc including these tags.
Tag | Purpose |
---|---|
<code> | formats in monospace type |
<sup> | bounds a superscript |
<sub> | bounds a subscript |
<strong> | boldfaces |
<em> | italicizes |
You can use HTML special character entities in Javadoc. Here are some examples.
Entity | What is shows on the page |
---|---|
& | & |
< | < |
> | > |
@items
@item | Use |
---|---|
@param | Create one of these for each parameter in your method. In the method detail, this goes under the Parameters: heading |
@return | Create this to describe your method's return value In the method detail, this goes under the Returns: heading |
@throws | Create one of these to describe any exception that your code can throw. |
Look in the B and F folders on the left for each block's javadoc.