Exception : java.lang.NullPointerException
<p>Iam getting <code>Exception : java.lang.NullPointerException</code>  in the following code. Plz correct it.</p>

<pre><code>String registerno=null;
registerno=request.getParameter("registerno");
int r;
if(registerno.equals("null")){  
    r=0;
}
else{
    r=1;
}
</code></pre>
