About Question enthuware.ocpjp.ii.v11.2.3430 :

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

Moderator: admin

Post Reply
teodorj
Posts: 33
Joined: Tue Jun 19, 2018 10:27 am
Contact:

About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by teodorj »

1. Convert ojdbc8.jar into automatic module.
2. Convert analytics.jar into a named module by adding module-info.java to it.
In this module-info, export all packages that are used by reports.jar and add requires clauses for all packages of ojdbc.jar that are used by analytics.jar.
3. Convert reports.jar into a named module. Add requires clause for analytics module in reports's module-info.java.
This option is not correct because it converts analytics.jar into named module. Am I correct?

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

Re: About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by admin »

Yes, as explained in option 2. Added explanation to this option as well.
thank you for your feedback!
If you like our products and services, please help us by posting your review here.

AlienFS
Posts: 7
Joined: Tue Sep 05, 2023 4:07 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by AlienFS »

I almost guessed wrong, because you state "module-info.java", where it could (or should) be "module-info.class".

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

Re: About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by admin »

The problem statement clearly asks you the steps that will be required to modularize your application. How will you add a requires clause to module-info.class unless you write it in module-info.java?
If you like our products and services, please help us by posting your review here.

AlienFS
Posts: 7
Joined: Tue Sep 05, 2023 4:07 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by AlienFS »

I totally understand what you are saying and I did clearly read that myself. The answers however don't clearly state you need to write a source file and add the compiled file to the .jar.

When you write in answers:
- 1: "reports.jar in its module-info.java"
- 2: "module-info.java to these jars."
- 3: "in reports.jar in its module-info.java"
- 4: "analytics.jar into a named module by adding module-info.java to it"

I cannot help but consider it a trick question as:
- 1: will not work, that file is not present in the .jar. It's will be present in the source folder, but not in the .jar.
- 2: will not work, needs to be .class for the desired effect.
- 3: will not work, that file is not present in the .jar.
- 4: will not work, needs to be .class for the desired effect.

The question doesn't state you need to recompile everything in your approach and it *could* be done simply by adding a module-info.class to the existing .jar. The answers, to me, hint to the latter approach.

In short: conceptually I totally knew what to do, but none of the answers make sense to me because of the .java extension.

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

Re: About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by admin »

OK, I see your point. May be just "module-info" would be better?
If you like our products and services, please help us by posting your review here.

AlienFS
Posts: 7
Joined: Tue Sep 05, 2023 4:07 am
Contact:

Re: About Question enthuware.ocpjp.ii.v11.2.3430 :

Post by AlienFS »

That would certainly improve the situation.

Post Reply

Who is online

Users browsing this forum: No registered users and 243 guests