title: How can you call a class that is implementing a certain interface without knowing its name?
body: <p>So I'm building a game engine and I need to be able to call methods from a class that implements a certain interface(I only want to call methods implemented by the interface).</p>
  
  <p>My problem is that I don't know what the class name will be implementing it.</p>
  
  <p>So how does, for instance, Java call the run() method in all classes that implement Runnable without knowing the class name?</p>