Edmund Yong wrote:I honestly don't understand what you're talking about. Is there really such a concept as "observable" modules and "readable" modules, or is it something that you *thought* it is? The book could have been clearer with some examples, instead of just printing theoretical statements.
The example that I gave is the simplest example for a bottom-up migration strategy. How can such a strategy work then? If I put the jar with no dependency, a.jar, on the module path, then the B class (in b.jar on the classpath) would not be able to load the A class. I would appreciate an explanation with examples (codes, and java commands). I would really like to see how B class can access A class.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Stephan van Hulst wrote:
The whole point of the unnamed module is that you can put dependent modules on the module path first, and then slowly migrate dependencies from the unnamed module to proper modules.
Stephan van Hulst wrote:
Think about it: Why would you write a JAR that makes use of a Java 9+ module, and then not immediately make it a Java 9+ module as well?
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Edmund Yong wrote:I honestly don't understand what you're talking about. Is there really such a concept as "observable" modules and "readable" modules, or is it something that you *thought* it is? The book could have been clearer with some examples, instead of just printing theoretical statements.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
A(n) _____ module can reference classes in a(n) _____ module.
Assume the package is exported as needed. (Choose all that apply).
A. automatic, named
B. automatic, unnamed
C. named, automatic
D. named, unnamed
E. unnamed, automatic
F. unnamed, named
G. None of the above.
Edmund Yong wrote:I ran the program as follows:
and now it works. I think I understand what Stephan meant now.
Another thing that I want to clarify is about named and automatic modules. They wouldn't be able to read any unnamed modules from the classpath, right? Below is a question from Sybex IZO-816 Test Bank. Answer (B) is supposed to be a correct answer, but I don't think it is correct. The correct answers should be A, C, E and F, right?
A(n) _____ module can reference classes in a(n) _____ module.
Assume the package is exported as needed. (Choose all that apply).
A. automatic, named
B. automatic, unnamed
C. named, automatic
D. named, unnamed
E. unnamed, automatic
F. unnamed, named
G. None of the above.
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
Edmund Yong wrote:Answer E is also correct
Enthuware - Best Mock Exams and Questions for Oracle Java Certifications
Quality Guaranteed - Pass or Full Refund!
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Get meta with me! What pursues us is our own obsessions! But not this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|