problem in array of button
<p>I am creating a dynamic array of buttons, but i am getting Nullpointer Exception. Why?
My sample code is:</p>

<pre><code> Button addAsFriend[];
 for( i=0;i&lt;c.getCount();i++)
 {
    addAsFriend[i]=new Button(this);
 }
</code></pre>
