title: which object method of interface implementation will be called
body: <p>I have a code like below in project. Here by casting with interface we are calling the method authenticate() of the service IAuthenticateService. Now there are 5 subclasses which have the same method implementation and Implementing the same interface IAuthenticateService. By seeing the code how will I come to know which class method implementation has been called? I'm little bit confused of interface design.</p>
  
  <pre><code>((IAuthenticateService) AuthServiceApp.getInstance().getContext()
                      .getService(ServiceEnum.CredentialService.name()))
                      .authenticate(inputParams);
  </code></pre>