title: Create Object of an Interface by String
body: <p>I have the following interface</p>
  
  <pre><code>package test.test;
  
  public interface IMyInterface {
   public String hello();
  }
  </code></pre>
  
  <p>and an implementation </p>
  
  <pre><code>package test.test.impl;
  
  public class TestImpl implements IMyInterface {
   public String hello() { return "Hello"; }
  }
  </code></pre>
  
  <p>So I have only the full String "test.test.impl.TestImpl". How can I load the Class and create a Object from the Implementation?</p>
  
  <p>I will use the current Classloader but I have no idea to create a Object.</p>
  
  <pre><code>Class&lt;?&gt; i =  getClass().getClassLoader().loadClass("test.test.impl.TestImpl");
  IMyInterface impl = null;
  </code></pre>
  
  <p>Thanks for help!</p>