Christian Schulz

Greenhorn
+ Follow
since Jun 16, 2020
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
1
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Christian Schulz

Jeanne,

thanks for your reply. Glad I understood it correctly.
Hi,

I have a question about review question #7 on page 486 of the Study Guide for exam 1Z0-815.

The review question asks:

Suppose module puppy depends on module dog and module dog depends on module animal. Which two lines allow module puppy to access the animal.behavior package in module anima? (Choose two)



The correct answer according to page 526 are D (requires on line T) and G (requires transitive on line S).

As I see it, the package animal.behavior can never be accessed from within module puppy directly, because it is only exported explicitly to module dog.
I have the following code:







When compiling the puppy module, I get the following error


When I change the module-info.java from module animal so that it only reads "exports animal.behavior" (without the "to dog" at the end). The code runs successfully and prints "behave!".
Am I missing something?