About Question enthuware.ocpjp.v21.2.3445 :

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

Moderator: admin

Post Reply
dameest
Posts: 16
Joined: Sat Nov 30, 2024 5:27 am
Contact:

About Question enthuware.ocpjp.v21.2.3445 :

Post by dameest »

Hello, can you please clarify your example because it seems incomplete to me. In customer module-info, You said: note that abc.print module is not required. How will the customer module find an implementation for Print service if it doesn't require a module which implements one?

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

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

Post by admin »

The module system and the Java service locator mechanism automatically make all available implementations of a service accessible to any module that says it requires that service. That's the whole point of declaring a service interface in a separate module. So that there is no direct dependency on the implementation module.

For details, please go through a good book such as Deshmukh's OCP 17 21 Fundamentals.

Post Reply

Who is online

Users browsing this forum: admin and 10 guests