I'm a beginner here in java oop. my code is showing this error. Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0 : <p><strong>THIS IS THE CODE</strong>
here I want to take value from cmd and use that to get the output. Please let me know if there is any other problem. Thanks</p>

<pre><code>class Basic
{
int b;
public void gd(int c){
b=c;
}
}


class HRA extends Basic
{

double hra=(0.25*b);

}


class DA extends HRA
{

double da=(0.75*b);

}


class PF extends DA
{

double pf=(0.12*b);

}

class Netsalary extends PF
{

double ns=b+hra+da+pf;

void display()
{

System.out.println("The net salary = "+ns);

}

}


class Netsalmain
{

public static void main(String arb[])
{

int a= Integer.parseInt(arb[0]);

Netsalary ob=new Netsalary();

ob.gd(a);    
ob.display();

}

}
</code></pre>

<p><strong>error is showing like this</strong></p>

<blockquote>
  <p>E:>java Netsalmain Exception in thread "main"
  java.lang.ArrayIndexOutOfBoundsException: 0
          at Netsalmain.main(iop.java:54)</p>
</blockquote>
