Java instantiate class from string
<p>I have the following,</p>

<pre><code>public interface SuperbInterface
public class A implements SuperbInterface
public class B extends A
public class C extends B
</code></pre>

<p>I want to instantiate <code>C</code> but I seems to be getting <code>B</code>, what did I do wrong?</p>

<pre><code>Class classz = Class.forName("C");
SuperbInterface superb = (SuperbInterface)classz.newInstance();

//Here when I debug it seems to be going to B.doWork() methods instead of C.doWork().
superb.doWork();
</code></pre>
