While running this code
public class Main
{
public int a;
public int b;
public static void main(String []args)
{
Main []ary=new Main[26];
int i;
for(i=0;i<26;i++)
{
ary[i].a=0;
ary[i].b=i;
}
}
}
I am getting the following error..
Exception in thread "main" java.lang.NullPointerException
at Main.main(Main.java:11)
I created an array of objects for the same class and trying to use its instance variables
Though I searched for it, i am not able to find the mistake..