This is where i am getting error
Student[] student = new Student[10];
System.out.println(" Test : " + student[2].RollNo);
But i do not get error when
Student student = new Student();
System.out.println(" Test : " + student.RollNo);
Error only shows up when i am creating array of objects.