##Module is a software package container designed for reuse. Each module contains a module descriptor, which contains information about the module name , module dependencies (the names of other modules it depends on) and the names of the packages 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 .
<strong>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; }</strong>
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!