A module that provides the implementation for the Service interface contains a "provides" statement in the module descriptor file. If the module doesn’t have the "provides" statement in the module descriptor file, the service loader can't load that module.
We can create the Service Provider Interface by using below steps:
In the below, we can define Service Provider Interface.
package com.tutorialspoint.serviceproviderinterface.spi; public interface ServiceProviderInterface { void printServiceName(); }