This is regard to the book OCP Oracle Certified Professional Java SE 11 Programmer I Study Guide: Exam 1Z0-815.
I think that this question is wrong. All A, B, D, and E should be correct options.
Question: Which are true of the --module option? (Choose all that apply.)
Choices: A. It is an option on the javac command.
B. It is an option on the java command.
C. It is an option on the jar command.
D. It is an option on the jdeps command.
E. It has a short form of -m.
F. It has a short form of -p.
The exam states that the correct choices are: B and E
But I chose A, B, D, E and got A, D wrong. The flag --module exists in both javac and jdeps.
My java version: java -version: openjdk version "11.0.7" 2020-04-14
javac --module: --module <module-name>, -m <module-name>---Compile only the specified module, check timestamps
jdeps --module: -m <module-name> --module <module-name>---Specify the root module for analysis
Campbell Ritchie wrote:I couldn't find a --module option for the java tool. I did find it for jdeps. I presume you know where to find the errata and you have checked them.
Hi Ritchie, you can find this phrase in the link that you have posted.
Executes the main class in a module specified by mainclass if it is given, or, if it is not given, the value in the module. In other words, mainclass can be used when it is not specified by the module, or to override the value when it is specified.
But it is true that it's not an obvious command if we use the flag.
I didn't see this question on the errata. That's why I am reporting now. Cheers!