8.2. Answers to mock exam questions
This section contains answers to all the mock exam questions in section 8.1. Also, each question is preceded by the exam objectives that the question is based on.
[7.2] Develop code that demonstrates the use of polymorphism; including overriding and object type versus reference type
[7.3] Determine when casting is necessary
[8.5] “Recognize common exception classes (such as NullPointerException, ArithmeticException, ArrayIndexOutOfBoundsException, ClassCastException)”
Given the following definition of the classes Animal, Lion, and Jumpable, select the correct combinations of assignments of a variable that don’t result in compilation errors ...