Page 1332 - AP Computer Science A, 7th edition
P. 1332
25. (A) The code does exactly what it looks like it should. The writePayInfo param et er is of t y pe Employee and eac h element of the empList array is-a Employee and therefore does not need to be downcast to its actual instance type. There is no ClassCastException (choice C) since nowhere is there an attempt made to cast an object to a class of which it is not an instance. None of the array elements is null; therefore, there is no NullPointerException (choice B). Choice D won’t happen because the getName method is inherited by both the Consultant and PartTimeEmployee classes. Choice E would occur if the Employee superclass were abstract, but it’s not.