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?

com.duck com duckling Duckling.java egg Egg.java module-info.java com.bread com bread com.park module-info.java

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

1 Expert Approved Answer
Step: 1 Unlock

The correct way to allow the compark package to reference the Duckling class in the comduck module w... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!