Java module 关键字
示例
声明一个模块
module mymodule {
}
定义和用法
The module
keyword is used to declare a module. Following the keyword is the name of the module and braces which can contain directives describing the module. module
关键字用于声明一个模块。关键字后面是模块的名称,以及可以包含描述模块的指令的括号。
Note: The module
keyword is meant to be used in the module-info.java file of a module. 注意: module
关键字应在模块的 module-info.java 文件中使用。
The module
keyword was new in Java 9. module
关键字是 Java 9 中的新功能。