Alan Couze wrote:I understand that 'C' is a correct answer, since there is an invalid override (more restrictive access modifier in the class is defined).
Alan Couze wrote:Answer 'D' does not seem to be a correct answer. The explanation says "Next, the class Cougar implements an overloaded version of getTailLength(), but since the declaration in the parent class Puma is invalid, it needs to implement a public version of the method. Since it does not, the declaration of Puma is invalid, so option D is correct." However, class Cougar does implement a public version of getTailLength().
Alan Couze wrote:'E' seems to be a correct answer, however the answer section says "Option E is incorrect, since Puma is marked abstract and cannot be instantiated." Shouldn't it say "Option E is correct"?
Alan Couze wrote:So I believe that C,E are correct answers, but D is not.
Alan Couze wrote:I see what I did wrong. I missed the fact that the getTailLength(int) is an overloaded method - I missed the int parameter!
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Roel De Nijs wrote:
Jeanne Boyarsky wrote:I've updated the errata list for both.
Should also be added to the "online materials" section as the assessment test can be taken online as well...
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:Besides I'm going to report the online ones so eventually they won't be wrong anymore...
Daniele Barell wrote:I resurrect this thread because I got another doubt about this same question, that is the last possible option, the option G.
It says:
G: The output can't be determined from the code provided.
I don't understand why it is not considered a correct option.
In fact you could not determine what is the output of the code provided since the multiple errors in it.
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:
"he output can't be determined from the code provided" - This means that the program runs successfully but you can't tell what the output is. That's something that happens with random numbers and threads. Neither of those are in exam scope for the OCA.
Jeanne Boyarsky wrote:...
"The output can't be determined from the code provided" - This means that the program runs successfully but you can't tell what the output is. That's something that happens with random numbers and threads. Neither of those are in exam scope for the OCA. This is an answer that makes sense for the OCP. We sprinkled it in some of the OCA questions so you get used to seeing it as an answer. It's pretty much guaranteed to be wrong on the OCA though!
[OCP 21 book] | [OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Jeanne Boyarsky wrote:Ooh good one! ...Have a cow!
There are 10 kinds of people in this world. Those that understand binary get this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|