JDK help document address
https://docs.oracle.com/javase/8/docs/api
JavaDoc
The javadoc command is used to generate your own API documentation
JavaDoc parameter information
- @author author name
- @version version number
- @since indicates the jdk version that needs to be used earliest
- @param parameter name
- @return Return value situation
- @throws exception throw situation
Adding to the class is the comment of the class, and adding to the method is the comment of the method
/**
* @author hu
* @version 1.0
* @since 1.8
*/ //类注释
public class Doc {
String name;
/**
* @param name //param 参数
* @return
*/ //方法注释
public String test(String name){
return name;
}
}
Open the folder
Use the command line to generate JavaDoc documents!
First enter the cmd window
Enter javadoc -encoding UTF-8 -charset UTF-8 Doc.java to
open the index.html webpage,
go in and click on Doc.
Key: Command line command format: javadoc parameter Java file