Java foundation - package mechanism and JavaDoc

Tears drop last
year has not been to the cheeks
- you face really big ^ ~ ^

Package mechanism

  • In order to better organize the class, Java provides a package mechanism for the difference between the class name of the namespace
  • Package bit syntax statement:
package pkg1[. pkg2[. pkg3...]];
  • General use company domain name as the package upside down
  • In order to be able to use a member of a package, we need to explicitly import the package in Java programs. Use the importstatement to be completed this function
import package1[.package2...].(classname|*);

JavaDoc

  • javadoc command is used to generate their own API documentation
  • Parameter information:
    • @author: author
    • @version: version number
    • @since: indicates the need to use the earliest version of jdk
    • @param: Parameter name
    • @return: The return value case
    • @throws: case an exception is thrown

Guess you like

Origin www.cnblogs.com/huangdajie/p/12411380.html