Java Reference
In-Depth Information
This example begins with a Javadoc comment that describes the main() method.
Sandwiched between /** and */ is a description of the method, which could (but
doesn't)includeHTMLtags(suchas <p> and <code> / </code> ),andthe @param
Javadoc tag (an @ -prefixed instruction).
The following list identifies several commonly used tags:
@author identifies the source code's author.
@deprecated identifiesasourcecodeentity(e.g.,amethod)thatshouldno
longer be used.
@param identifies one of a method's parameters.
@see provides a see-also reference.
@since identifies the software release where the entity first originated.
@return identifies the kind of value that the method returns.
Listing 1-2 presents our HelloWorld application with documentation comments
that describe the HelloWorld class and its main() method.
Listing 1-2. Greetings from Java with documentation comments
A simple class for introducing a Java application.
@author Jeff Friesen
class HelloWorld
Application entry point
@param args array of command-line arguments passed to
this method
public static void main(String[] args)
System.out.println("hello, world!");
Search WWH ::

Custom Search