About Question enthuware.ocpjp.v7.2.1334 :

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
leorbarbosa
Posts: 17
Joined: Wed Nov 26, 2014 1:59 pm
Contact:

About Question enthuware.ocpjp.v7.2.1334 :

Post by leorbarbosa »

I think:

As the access modifier of the method is "private" in the ancestral class, the method is not being recognized by the base reference in the derived class, although there is a method of the same name in the derived class.

admin
Site Admin
Posts: 10386
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1334 :

Post by admin »

That is correct.

Elecded
Posts: 2
Joined: Wed May 10, 2017 9:11 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1334 :

Post by Elecded »

Well, when question is "What will be the output when the class is run", must it not follow, that the class is successfully compiled? That class is ran is a prerequisite and you cannot run the class that is not compiled.

It's like asking "The Sphynx tells you a riddle bla-bla-bla, what is your answer?" and the right answer is that the Sphynx does not exist ;)

I understand though that questions like this could be on the real exam.

admin
Site Admin
Posts: 10386
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.ocpjp.v7.2.1334 :

Post by admin »

From a purely logical perspective, you are right. But, as you noted, this way of formulating the question is common in the real exam as well. If one of the option indicates the possibility that the code may not compile, then it is implied that you have to consider that possibility as well and answer accordingly.

HTH,
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests