Loading…
Loading…
Ten exam-style questions on module services: the service provider interface, service locator, consumer and provider, the uses and provides directives, ServiceLoader with findFirst, stream and Provider, and the rules for provider classes, with explanations.
Practice questions for the article Java Module Services: Service Provider Interface, ServiceLoader, uses and provides.
The examples use a parking app: park.api holds the interface park.api.Rate, park.lookup finds implementations, park.app is the consumer, and park.city provides an implementation. Aim for at least 8 out of 10.
Quiz path: step 86. Take the quizzes in this order, after reading each article.
Previous quiz: Module Declarations: requires, exports and opens (OCP 21)
Next quiz: Java Module Commands (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.