hi,i write a code for multiplication table,it is compiled properly but it is showing run time error.i think there is some problm in declaring array.i cant fix it.plz help me out with this..i am a beginner in java.
My code is
class Multiplication
{
public static void main (String[] a)
{
int num = Integer.parseIn t(a[0]);
for( int i=1;i<=10;i++)
System.out.prin tln(i*num);
}
}
Error is :
Exception in thread "main" java.lang.Array IndexOutOfBound sException: 0 at Multiplication. main(Main.java: 6)
My code is
class Multiplication
{
public static void main (String[] a)
{
int num = Integer.parseIn t(a[0]);
for( int i=1;i<=10;i++)
System.out.prin tln(i*num);
}
}
Error is :
Exception in thread "main" java.lang.Array IndexOutOfBound sException: 0 at Multiplication. main(Main.java: 6)
Comment