Page 1 of 1

About Question enthuware.ocpjp.v7.2.1334 :

Posted: Wed Nov 26, 2014 2:04 pm
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.

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

Posted: Thu Nov 27, 2014 12:35 am
by admin
That is correct.

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

Posted: Thu May 11, 2017 1:54 am
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.

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

Posted: Thu May 11, 2017 5:44 am
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.