title: Create an instance within Abstract Class using Reflection
body: <p>Is it possible to create an instance of a derived class in abstract ancestor class using reflection
  Lets say:</p>
  
  <pre><code>abstract class Base {
  
  public Base createInstance(){
    //using reflection
      Class&lt;?&gt; c = this.getClass();
      Constructor&lt;?&gt; ctor = c.getConstructor();
      return ((Base) ctor.newInstance());
  }
  
  }//end Base
  
  class Derived extends Base {
  
   main(){
  
  new Derived().createInstance()
  
   }
  </code></pre>
  
  <p>}</p>