Question: Given the diagram in the previous question, what could we add to module-info.java in com.duck to allow the com.park package to reference the Duckling class,
Given the diagram in the previous question, what could we add to module-info.java in com.duck to allow the com.park package to reference the Duckling class, but not allow the Egg class to reference the Duckling class?

A. exports com.duckling;
B. exports com.duckling from com.park;
C. exports com.duckling to com.park;
D. exports com.park from com.duckling;
E. exports com.park to com.duckling;
F. None of the above.
com.duck com duckling Duckling.java egg Egg.java module-info.java com.bread com bread com.park module-info.java Food.java com park Grass.java module-info.java
Step by Step Solution
3.48 Rating (148 Votes )
There are 3 Steps involved in it
The correct way to allow the compark package to reference the Duckling class in the comduck module w... View full answer
Get step-by-step solutions from verified subject matter experts
