So you would get a NullPointerException when you run this code.
No, there's no NPE here. The problem arises when trying to add a new Parent object to a Child array. The confusion comes from the Child array reference being type compatible with the Parent array. The underlying array remains of the Child type, so adding a Parent object will cause an assignment error.
My confusion is whats wrong happening at //1 that we are getting ArrayStoreException. What I feel is that we are just reinitializing the array element.
Please elaborate on it.
p = new Parent(); //1 You are right that here you are just reinitialiing the array element.
But when you did this : Child  c = new Child; Parent  p = c;
I think now p refers an array that can only contain Child elements. So doing p=new Parent(); means trying to add a Parent object in an array that can only hold Child objects which is not possible, hence we get ArrayStoreException.
Correct me if I am wrong.
Regards<br />Sandy<br />[SCJP 5.0 - 75%]<br />[SCWCD 1.4 - 85%]<br />------------------<br />Tiger, Tiger burning bright,<br />Like a geek who works all night,<br />What new-fangled bit or byte,<br />Could ease the hacker's weary plight?