Return to site

☕🎓JAVA CERTIFICATION QUESTION: JPMS

· ocp,java

What is the correct name for the file serving as a module descriptor among the options below?

* module.java

* module.info

* module-info.java

* module.xml

* module-info.xml

#java #certificationquestion #ocp

https://www.udemy.com/course/ocp-oracle-certified-professional-java-developer-prep/?referralCode=54114F9AD41F127CB99A

The correct name for the file serving as a module descriptor among the provided options is module-info.java.

In Java, with the introduction of the Java Platform Module System (JPMS) in Java 9, a module descriptor file is used to define the characteristics and dependencies of a module.

This file must be named module-info.java.

The naming convention is crucial, as the Java compiler recognizes this specific filename when compiling the module.

The other options (module.java, module.info, module.xml, and module-info.xml) do not follow the required naming convention for the module descriptor file.

Therefore, module-info.java is the correct and standard choice for the module descriptor file in Java modules.