##Moduleis a software package container designed forreuse. Each module contains amodule descriptor, which contains information about themodule name,module dependencies(the names of other modules it depends on) and the names of thepackages it exports, these Packages can only be used by dependent modules
Advantages of modulesp>Modules can be declared in a file named "
module-info.java", which is the module descriptor .
module com.tutorialspoint.app{ // Modules upon which the module "com.tutorialspoint.app" depends on requires com.tutorialspoint.services; // Packages exposed by this module that can be used by other modules exports com.tutorialspoint.app.util; }
The above is the detailed content of What are the advantages of modules in Java 9?. For more information, please follow other related articles on the PHP Chinese website!