What is the use of constructor in Abstract Class?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2105783/what-is-the-use-of-creating-a-constructor-for-an-abstract-class-in-java">What is the use of creating a constructor for an abstract class in Java?</a>  </p>
</blockquote>



<p>Example: </p>

<pre><code>abstract public class AbstractDemo 
{
    private int ab;
    public AbstractDemo() 
    {
        ab=10;
    }

    public int getAb()
    {
        return ab;
    }

    public void abstractMethod()
    {
        //On the line below it gives error.
        AbstractDemo demo=new AbstractDemo();
    }

}
</code></pre>

<p><em>Edited to format code</em></p>
