About Question enthuware.ocpjp.v21.2.4023 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
giginar
Posts: 10
Joined: Fri Feb 07, 2025 5:36 pm
Contact:

About Question enthuware.ocpjp.v21.2.4023 :

Post by giginar »

Hello,

option d) Only public members of the com.amazing.movies package are accessible only to the members of the rentals module.

option e) Inserting requires movies; in rentals module-info enables the rentals module to access members of the com.amazing.movies package of the movies module. (Explanation: The exports and exports-to clauses only make the public members of a package eligible to be accessed from outside the module. But for another module to access the exported packages, it must also have an appropriate requires clause.)

is not the explanation of the correct answer makes the option d correct?

admin
Site Admin
Posts: 10408
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v21.2.4023 :

Post by admin »

No, because in the given code, module rentals does not have the requires clause. So, even though the exports clause is ok but without the requires clause in rentals, nothing is accessible in rentals.

giginar
Posts: 10
Joined: Fri Feb 07, 2025 5:36 pm
Contact:

Re: About Question enthuware.ocpjp.v21.2.4023 :

Post by giginar »

the option is true as long as there is requires clause in the module. thank you.

admin
Site Admin
Posts: 10408
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v21.2.4023 :

Post by admin »

If you look at only the exports clause, then public members of the com.amazing.movies package are accessible to all other modules (assuming that they have appropriate requires clause.)

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 64 guests