Hi!
chapter 11 , Review Questions
21. Which of the following are legal commands to run a modular
program where n is the package name and c is the class name?
(Choose all that apply.)
A.
java –module-path x -m n.c
B. java --module-path x -p n.c
C. java --module-path x -m n/c
D. java --module-path x -p n/c
E. java --module-path x -m n c
F. java --module-path x -p n c
G. None of the above
Appendix answers
21. C. The -p option is a shorter form of --module-path. Since the
same option cannot be specified twice, options B, D, and F are
incorrect. The --module-path option is an alternate form of -p. The
module name and class name are separated with a slash, making
option C the answer.
My question:
Is options C really correct?
I thought the structure of java-command is like this
java -p MODULE_PATH
-m MODULE_NAME_FROM_DESCRIPTOR
/AT_LEAST_ONE_PACKAGE_NAME
.CLASS_NAME
C.fixed) java --module-path x -m module_name/n.c
So correct is option G.
Or I'm wrong? Thanks for the answer.
PS my another similar question
https://coderanch.com/t/748077/certification/Sybex-potential-error-chapter-Review#3474814