answer: B
provides <service-interface> with <service-implementation>
A module can specify that it provides a service with a specific type of service provider.
"requires PrintServiceAPI" bacause service provider is defined in the third separate module PrintServiceAPI.
The correct answer is B. A service provider module should use the provides directive to declare that it provides an implementation of a service. The provides directive specifies the service type and the implementation class. In this case, the PrintServiceProvider module provides an implementation of the org.printservice.spi.Print service with the com.provider.PrintService class.
B: Correct.
service provider provides service using below syntax:
module SERVICEPROVIDER {
requires MODULENAME1;
requires MODULENAME2;
provides SERVICEINTERFACE with IMPLEMENTATION;
}
https://www.logicbig.com/tutorials/core-java-tutorial/modules/services.html
upvoted 1 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
ASPushkin
3 months, 3 weeks agoStavok
1 year, 6 months agoaruni_mishra
1 year, 7 months agoaruni_mishra
1 year, 7 months ago