
============================ 答案 ==============================
================================================================
================================================================
E. Modules are required to have a module-info.java file at the root directory of the module. Option E matches this requirement.

============================ 答案 ==============================
================================================================
================================================================
B. Options A, C, and E are incorrect because they refer to directives that don't exist. The exports directive is used when allowing a package to be called by code outside of the module, making option B the correct answer. Notice that options D and F are incorrect because of requires.

============================ 答案 ==============================
================================================================
================================================================
G. The -m or --module option is used to specify the module and class name. The -p or --module-path option is used to specify the location of the modules. Option D would be correct if the rest of the command were correct. However, running a program requires specifying the package name with periods (.) instead of slashes. Since the command is incorrect, option G is correct.

============================ 答案 ==============================
================================================================
================================================================
D. A service consists of the service provider interface and logic to look up implementations using a service locator. This makes option D correct. Make sure you know that the service provider itself is the implementation, which is not considered part of the service.

============================ 答案 ==============================
================================================================
================================================================
E, F. Automatic modules are on the module path but do not have a module-info.java file. Named modules are on the module path and do have a module-info. Unnamed modules are on the classpath. Therefore, options E and F are correct.

============================ 答案 =====


411

被折叠的 条评论
为什么被折叠?



