
一个模块是包的容器,每个模块都包含一个包含模块名称、模块依赖项的模块描述符,这意味着其他模块的名称取决于它,并且它导出的包的名称只能被依赖于它的模块使用。
<strong>module com.tutorialspoint.app {
/** Modules upon which the module com.tutorialspoint.app depends on */
requires com.tutorialspoint.services;
/** Packages exposed by this module which can be used by other modules */
exports com.tutorialspoint.app.util;
}</strong>Java 9模块提供了三种不同的编译模式:传统模式、单模块模式和多模块模式。
立即学习“Java免费学习笔记(深入)”;
立即学习“Java免费学习笔记(深入)”;
以上就是Java 9中模块的不同编译模式是什么?的详细内容,更多请关注php中文网其它相关文章!
java怎么学习?java怎么入门?java在哪学?java怎么学才快?不用担心,这里为大家提供了java速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号