O'Reilly logo

OCA Java SE 7 Programmer I Certification Guide: Prepare for the 1Z0-803 exam by Mala Gupta

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 objective that the question is based on.

[7.3] Differentiate between the type of a reference and the type of an object

ME-Q1.

Given the following definition of the classes Animal, Lion, and Jumpable, select the correct combinations of assignments of a variable (select 2 options):

interface Jumpable {}
class Animal {}
class Lion extends Animal implements Jumpable {}
a Jumpable var1 = new Jumpable();
b Animal var2 = new Animal();
c Lion var3 = new Animal(); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required