Example:
/** * Title: Person class<br/> * Description: Explain the document annotation in Java through the Person class<br/> * Company: *** * @author *** * @version 1.0 */public class Person { /** * This is the constructor of the Person class* @param name Person's name* */ public Person(String name) { //Execute statement; } /** * This is the description of the read() method* @param bookName The name of the book read* @param time The time spent reading* @return The number of books read* */ public int read(String bookName, int time) { //Execute statement; return 1; }}Generate command
person Mac$ javadoc -d . -version -author Person.java
Note that the Person.java path name must be correct.
Effect:
Where index.html is the home page, open the following figure:
The example of the above Java document annotation generation help document is the entire content I share with you. I hope you can give you a reference and I hope you can support Wulin.com more.