hello i am beginner to java i wrote a simple program of object array but it is showing run time error
Exception in thread "main" java.lang.NullPointerException
at classarr.main(classarr.java:14)
class abc{
int i;
}
class classarr{
public static void main(String arg[])
{
abc a[]=new abc[4];
int j;
for(j=0;j<=3;j++)
a[j].i=j+1;
for(j=0;j<=3;j++)
System.out.print(a[j].i);
}
}
please help me