Java Reference
In-Depth Information
Clicking on the name of a method brings up the method's detail page, as in the
API Specification. The web page that is generated for the preceding distance
method looks like this:
Method Detail
]
distance
public double distance ( Point p)
Computes and returns the distance between this point and the given other point.
Parameters:
p — the point to which the distance is computed
Returns:
the distance, computed as the square root of the sums of the squares of the
differences between the two points' x -coordinates ( dx ) and between their
y -coordinates ( dy )
Throws:
java.lang.NullPointerException — if p is null
Because Javadoc comments are converted into HTML, they can contain HTML
tags that will show up in any generated Javadoc pages. You may use these tags to for-
mat your comments.
Javadoc comments provide documentation to clients that lets them know how to
use your class without needing to read its source code. However, they are lengthy and
can take time to write. Writing Javadoc comments is most useful when you know that
your class will be used by many clients.
Sun maintains a web site with much more information about writing Javadoc com-
ments at the following URL:
http://java.sun.com/j2se/javadoc/writingdoccomments/
 
 
Search WWH ::




Custom Search