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: 10043
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.
If you like our products and services, please help us by posting your review here.

MichaelZett
Posts: 22
Joined: Wed Dec 10, 2014 8:28 am
Contact:

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

Post by MichaelZett »

Hi,

just a small issue: in the above answer the word 'the' is too much in my opinion.

Bye,
Michael

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

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

Post by admin »

Right. Fixed.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 28 guests