How is it possible to create a sub class object within it's base class?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5449068/how-is-it-possible-to-create-a-sub-class-object-within-its-base-class">How is it possible to create a sub class object within it&#39;s base class ?</a>  </p>
</blockquote>



<pre><code>class arijit
{
 public static void main(String args[])
 {
  System.out.println("Base class main");
  amit ab=new amit();
  ab.a();
  ab.ma();
 }
 public void ma()
 {
  System.out.println("Base class method");
 }
}

class amit extends arijit
{
 public void a()
 {
  System.out.println("Sub Class method");
  ma();
 }
}
</code></pre>
