This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
That's because Dog and Cat are siblings. You cannot add an instance of Cat into an array of Dogs.
Now you will say that the array is of Animals. But actually only the reference is an Animal array. Actually the array itself is a Dog array. Consider this code
Dog dogArr = new Dog; Animal arr = dogArr; arr=new Cat();//ArrayStoreException Dog dog = godArr;//1
Now if there was no ArrayStoreException at the line indicated, then there would be a abnormal situation at line 1. So an array can only store objects of the actual array type. You can read my blog for a detailed article. The link is in my signature...