JavaDoc is a tool which extracts information from a Java source file to create an API. It is specifically oriented toward this kind of documentation. To quote How to Write Doc Comments for the JavadocTM Tool, an API should describe “all aspects of the behavior of each method on which a caller can rely”. One generally uses JavaDoc to document things such as Classes, Interfaces and Methods but one can theoretically use it for anything written in Java by defining custom tags and creating custom DocLets.

JavaDoc is written within the Java source code for a particular project and then the javadoc tool is used to extract the JavaDoc-marked-up sections and create the HTML files that comprise the JavaDoc output.