About Question enthuware.ocpjp.v11.2.3151 :

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

Moderator: admin

Post Reply
fssales
Posts: 1
Joined: Thu Dec 23, 2021 8:59 am
Contact:

About Question enthuware.ocpjp.v11.2.3151 :

Post by fssales »

Given the following contents of module-info.java:

Code: Select all

module enthu.finance{   
     exports com.enthu.Reports to com.enthu.tax;   
     requires transitive enthu.utils; 
} 
The correct answer is that
Only class from the com.enthu.tax module are allowed to read classes in the com.enthu.Reports package.
Could someone explaining about that option:
The enthu.finance module exports only the those classes that are used by the com.enthu.tax module.
The explanation session don't have any details about this option and I need more clarification.

Is it about automatic modules or unnamed modules?

Thanks

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

Re: About Question enthuware.ocpjp.v11.2.3151 :

Post by admin »

>>The enthu.finance module exports only the those classes that are used by the com.enthu.tax module.

This option does not make any sense because there is no way for a module to know which of its classes are actually being used (or will actually be used) by another module. A module can only specify which of its classes can be used by others by using an appropriate exports clause.

Post Reply

Who is online

Users browsing this forum: No registered users and 5 guests