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 中的新功能。