1 import java.util.*; 2 3 /* 4 The javadoc class comment must immediately precede the class declaration. 5 In particular, a package declaration or import declarations must come first. 6 */ 7 8 /** 9 * The class <code>Test</code> illustrates some features of 10 * javadoc. Notice that javadoc assumes the class name and 11 * can figure out the parameters in a "see" tag. 12 * 13 * @version 37.41.3beta 14 * @author Ryan Stansifer 15 * @since 1.0 16 */ 17 18 public class Test { 19 20 /** A field or instance variable. */ 21 String name; 22 23 /** 24 * Creates a new instance of the class. The field 25 * <code>name</code> is set to the string <code>"unknown"</code>. 26 */ 27 Test () { name="unknown"; } 28 29 /** 30 * A pointless function that always returns <code>null</code>. 31 * @param x the argument to this function 32 * @return the constant <code>null</code> is always returned 33 * @see java.lang.Object 34 * @see #getName 35 * @see Test#getName 36 */ 37 Object fun (int x) { return null; } 38 39 /** 40 * A getter function for the field <code>name</code>. 41 * @return the value of the field <code>name</code>. 42 * @see #fun 43 */ 44 String getName () { return name; } 45 46 47 }