Return to site

JAVA CERTIFICATION QUESTION: The Java Platform Module System and the ServiceLoader class

=>Yes, the JPMS ServiceLoader class loads services. How’s your knowledge of the details?

August 23, 2021

Which statement about the Java Platform Module System (JPMS) is true? Choose one.

A. The ServiceLoader.load(Class service) returns an Iterator instance.

B. The ServiceLoader.load(Class service) returns a ServiceLoader instance.

C. JPMS introduces a mechanism to load service implementations from the META-INF/service directory.

D. Changing the implementation of a service requires recompiling the module definition of the client module.

E. A service provider class must implement an interface that defines the API of the service.

F. A service provider class must have a public zero-argument constructor.

 

 

 

 

 

 

·ꓭ uoᴉʇdo sᴉ ɹǝʍsuɐ ʇɔǝɹɹoɔ ǝɥꓕ