Edward Lawrence wrote:1. Why wouldn't line 48 compile without the cast when line 42 did not need one?
Because one is upcasting and the other is downcasting.
2. why does line 50 produce a compile error without the "//" but line 42 seems to run the Dog initialization block without errors?
Because Animal's "i" is protected, which means it can only be accessed from subclasses of Animal or classes in the same package as Animal. Since your Array class is neither it cannot access dog.i.